Trim Database based on cell values in another sheet

Tysla

New Member
Joined
Jul 4, 2019
Messages
5
I have 2 worksheets....




In Sheet1, I have a list of 100 Static IDs ( they never change ) in Column D. Starting from D11 to D111


In Sheet2, I have a dynamic database ( updated daily ) of about 25,000 rows. Each ID ( from Sheet1 ) will appear ONLY ONCE in Sheet2.ColA.


Need a VBA to delete rows, where the value in Column A is NOT EQUAL to any of the 100 IDs.


In short, I need a procedure to trim the Sheet2 from 20,000 rows down to 100 rows only.


Also, if possible to sort the Sheet2 data, in the same order Sheet1

Thanks..........
 
If you do what I said in post#9 does the data get filtered?
 
Upvote 0

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Forum statistics

Threads
1,214,588
Messages
6,120,409
Members
448,959
Latest member
camelliaCase

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