View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Selecting a range to delete

Or filter for blanks........

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"excelent" wrote in message
...
This one delete entirerow where Alt is in col G

Sub DelRows()
Dim t, rk
Application.Calculation = xlCalculationManual
rk = Cells(65500, "G").End(xlUp).Row

For t = 1 To rk
If Cells(t, "G") < "Alt" Then Cells(t, "CV") = 1
Next

Range("CV1:CV" & rk).SpecialCells(xlCellTypeBlanks).EntireRow.Delet e
Range("CV1:CV" & rk) = ""
Application.Calculation = xlCalculationAutomatic
ActiveCell.Select
End Sub


"John Keith" skrev:

After sorting a large amount of data (approaching 62,000 rows) I would
like to select a range that includes all the rows that contain the
value "Alt" in column G and delete the entire selection (complete
row). What is the fastest way to determine how to specify this range
area? I originally was doing this in a for loop and the data set has
grown to the point where the speed of the loop is just too limiting.
If there is a faster approach than the sort option I'm think about
please offer your suggestion!

Thanks


John Keith