Help with Range Object

G

Guest

In My spreadsheet I have in Cells A1:A9
abc
123.00
wer
654.00
765.00
432.00
ghj
mkil
ghj

My Macro is:
Sub Delete_rows_based_on_ColA()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Dim cell As Range, rng As Range, i As Long
Set rng = Columns("A").SpecialCells(xlConstants, xlTextValues)
For i = rng.Count To 1 Step -1
If LCase(rng(i).Value) = "ghj" _
Then rng(i).EntireRow.Delete
Next i
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub

The above is not even getting close to my cells A7 and A9 where my criteria
is; Why Not?
TIA,,
 
G

Guest

You are in the wrong news group. This news group is for Access. I would
suggest you post your question in one of the Excel news groups.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top