To start, I don't think VLOOKUP
will work for me because I have dozens of columns in each table.
Let's say I have Table 1:
Serial# Value1 Value2 Value3 Value4
1 4 34 65 23
2 123 43 54 46
3 87 98 85 34
4 654 8 645 3
And Table 2:
SF
1
3
4
I would like a way to filter Table 1 based on the serial numbers found in SF.
Serial# Value1 Value2 Value3 Value4
1 4 34 65 23
3 87 98 85 34
4 654 8 645 3
Using a VLOOKUP
would mean I have to write a formula for every column I want filled. i'd like to avoid that.
Thanks
Go back to Sheet1, select a blank cell beside the original table, then enter formula =COUNTIF(ListID, A2) (Note: ListID is the range name you have created in step1, A2 is the cell within the column that you want to filter by) into the Formula Bar, and then press the Enter key.
Run the Advanced Filter Select a cell in the data table. On the Data tab of the Ribbon, in the Sort & Filter group, click Advanced, to open the Advanced Filter dialog box. For Action, select Filter the list, in-place. For List range, select the data table.
The FILTER function in Excel is used to filter a range of data based on the criteria that you specify. The function belongs to the category of Dynamic Arrays functions.
Based on the example you've given I don't see too many columns being a problem for a formula if you're matching all the serials from 1 column to another.
Assuming Table2 is in a tab called Table2. You could use this formula at the end column of Table1.
=IF(ISERROR(VLOOKUP(A1,Table2!A:A,1,FALSE)),"FILTER ME OUT","KEEP ME")
Paste the above formula down the whole column until the last line on the dataset.
Then filter on that edge column whichever way you see fit, I'm assuming covering the actual filtering will be overkill but here it is for any beginners. I would use an AutoFilter (Click anywhere in Table1 dataset, hold down alt, press "DFF" for Excel 2003 and prior or Ctrl + Shift + L for the later versions of Excel or go to Data -> Filter), select the arrow on the newly created filter column and filter out the "FILTER ME OUT" values.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With