Hello VBA guru's - - I have a large excel file that column A contains zip codes. All the zip codes are in Illinois to be exact. But I only need to see about 30 zipcodes. I have some code below that will delete the row if the value does not exist. I'd like to create some sort of variable or Dim where I can list the 30 or so zip codes then reference this variable. I'm getting lost on the syntax so a little help would be great!
I'm thinking something like an 'in' in sql? But I'm not 100% sure how that would be done. Is there a way to include another dim that would list each zip, like zipnumber = (60110,60030,60011) instead of repeating the .value as in my example below? Then my if would look more like if .value = zipnumber then delete...? make sense?
Thanks for your thoughts/assistance! Here's my test code (which I got from this great forum!!!!
Bookmarks