Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA with excel

Status
Not open for further replies.

davetek

Programmer
Oct 30, 2002
42
IE
Hi,
i need to to delete rows in excel based on conditions on a certain row.....i.e. delete all rows where 'X' is in col A
any suggestions??
 
Try this
Sub delRows()
for i = Range("A65536").end(xlup).row to 2 step -1
if range("A" & i).text = "a" then
rows(i & ":" & i).entirerow.delete
else
end if
next i
end sub Rgds
~Geoff~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top