View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
מיכאל (מיקי) אבידן מיכאל (מיקי) אבידן is offline
external usenet poster
 
Posts: 561
Default Macro to delete row

Hi,
One approach might be:
=================
Sub John()
LR = [H65536].End(xlUp).Row
For R = LR To 1 Step -1
If Cells(R, 8) < "John" Then Cells(R, 8).EntireRow.Delete
Next
End Sub
========
Micky


"puiuluipui" wrote:

Hi, i need a macro to delete rows that don't have in "H" column the name "John"
If in "H" column the code finds anything else, then to delete row.
Can this be done?
Thanks!