Delete Rows based on Criteria

chasing_answers

New Member
Joined
Mar 16, 2010
Messages
1
I am running Excel 2003 on Windows XP.

I would like to perform the following

Vlookup(c6,'Sheet 2'!a1:b43300,2)

The Vlookup would be used for rows d6:d81 on Sheet 1. Each following vlookup would be the same format (e.g. Vlookup(c6,'Sheet 2'!a1:b43300,2)). C6 represents a zip code with a maximum of 76 different values. Column a in sheet 2 represents all of the zip codes in the United States. After performing the Vlookup, I would like to delete all the rows in Sheet 2 that did not have an entry in column A matching any of the entries in column C of sheet 1. Thus, the only rows remainin on sheet 2 would be those that have a match for the vlookup performed on sheet 1. I am doing this to reduce file size.

Many thanks in advance.
 
Last edited:

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
1) In D6, enter this formula:
=ISNUMBER(MATCH(C6, 'Sheet 2'!$A:$A, 0)

2) Copy that cell down all the way to D81. The column is now full of TRUE/FALSE results

3) Click on D5...if that cell is empty, put some text in it temporarily

4) Click Data > Filter > Autofilter to turn on the Autofilter

5) Use the drop down that appears in D5 and filter by FALSE

6) Delete all the rows you still see visible

7) Click Data > Filter > Autofilter to turn it off

8) Clear the formulas and you're done
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top