'WorksheetDeleteRow.bas deletes all rows of data if contents in specified 'column meet specified criteria. In this example, rows are deleted if 'data in Column C is greater than 70. '====================================== Sub Main Dim SurferApp As Object Set SurferApp = CreateObject("Surfer.Application") SurferApp.Visible = True Dim Wks As Object filename$ = GetFilePath(,"dat") If filename$ <> "" Then Set Wks = SurferApp.Documents.Open(filename$) End If 'Sets the WksRange variable to all rows in Column C Dim WksRange As Object Set WksRange = Wks.Columns(Col1:=3) 'Deletes the entire row if data in column C is greater than 70 For i=2 To Wks.UsedRange.LastRow If WksRange.Cells(i,1) > 70 Then WksRange.Cells(i,1).Delete(Direction:=wksDeleteRows) i=i-1 End If Next i End Sub