Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Adrian,
If I'm understanding your problem correctly, it's similar to some I've had. Maybe there's a more elegant way, but I've just brute-forced it with nested For..Next loops. The outer loop would go from 1 to 200 and read in the matching variable from your 200-member list; the inner loop would go from 1 to 30 and read in the matchng variable from the 30-member list. Then you use an if statement to see if they match. If the variables are string you have to use StrComp. Then use the outer index to identify the row to delete. Hope this helps. -----Original Message----- Can anybody help? I'm getting there but still pretty new to this and this is my first VBA experience with lookups. I have a s/sheet with 200 rows. I have a list (the lookup list) with a column of 30 rows. Now, I wish to check each of the values in Column A of the 200 rows on the first s/sheet and, if there is not a matching entry in the lookup list column I want to delete the row. Is lookup the best option for this or should I use multiple IF statements? If it is where do I start? Thanks, Adrian ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I identify matching rows of data and delete them both? | Excel Discussion (Misc queries) | |||
how do I perform a lookup on an 80,000 line array? | Excel Worksheet Functions | |||
delete all matching rows | Excel Discussion (Misc queries) | |||
How do you perform a two-column lookup? | Excel Discussion (Misc queries) | |||
How to Perform Lookup on Alphanumeric Data? | Excel Discussion (Misc queries) |