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 dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete Rows with certain data

Status
Not open for further replies.

n3tw0rkadm1n1strat0r

IS-IT--Management
Aug 29, 2006
119
US
I've tried this code to filter out the rows that contain certain data:

Code:
objExcel.Range("A:A").Entirerow.Delete '4 = "Data"

But it ends up deleting everything!
 
But it ends up deleting everything
As expected.
What is the difference for you between "filter out" and "delete" ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Sorry, I meant that I want to delete any rows that contain the word "Data" or maybe two or three words "Data1,Data2,Data3".
 
Sorry just trying to figure this out...do I have to make a selection when doing this or is what I have right and I just need to fix a couple things?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top