Filter multiple choices in to one spreadsheet

GMC The Macro Man

Board Regular
Joined
Mar 23, 2023
Messages
104
Office Version
  1. 2021
Platform
  1. Windows
Hi there
I have a daily spreadsheet that has about 20 columns and over 3000 rows where I need to filter out a selected list of users.
The image below is a slimmed down version and the User List (Column G) is a TABLE which is normally on a different TAB within the Workbook
The Unique Identifier is Column A (USER) which could hold up to 200 individual users.
My task is to go through all of the User (Col A) and if the User appears in the User List (Col G) then I need to copy the data in that row and paste to a new Line in a new worksheet
I have tried both V & X lookup, FILTER, and VBA but I'm struggling to get any formula to LOOKUP the User list and continue until all Users have been verified.
I have also added an image below of what my expected output should look like
Any help would be appreciated

1683207168125.png


In this demo, there was only 2 users who where in the User List and this is the expected output
1683207820387.png
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
I'm not sure if I understand this:

MrExcelPlayground17.xlsx
ABCDEFGHIJKLM
1UserDeptManagerTicketUsers ListUserDeptManagerTicket
2A1M1AA1M1
3A1M2CA1M2
4B2N3HC3O5
5B2N4JH8T13
6C3O5H8T14
7D4P6H8T15
8D4P7J10V18
9E5Q8J10V19
10E5Q9J10V20
11E5Q10
12F6R11
13G7S12
14H8T13
15H8T14
16H8T15
17I9U16
18I9U17
19J10V18
20J10V19
21J10V20
Sheet4
Cell Formulas
RangeFormula
J2:M10J2=FILTER(A2:D21,ISNUMBER(XMATCH(A2:A21,G2:G5,0)))
Dynamic array formulas.
 
Upvote 1
Solution
Hey @JamesCanale
This has worked perfectly, thank you so much. I have a little formatting to do like get rid of ZERO's and remove a couple of columns which I think I know how to manage.
1 more question if I may?
On the demo above you filtered on the data A2:D21. My daily reports will always be the same no of columns but will not be the same no of rows and I don't want to change the FILTER formula daily.
Is there a method on how to select the array without setting defined cells

Thanks again for solving this for me, I really appreciate you taking the time to look at it
 
Upvote 0
Format your data as a table. Excel will manage the rows you need.

MrExcelPlayground17.xlsx
ABCDEFGHIJKLM
1UserDeptManagerTicketUserListUserDeptManagerTicket
2A1M1AA1M1
3A1M2CA1M2
4B2N3HC3O5
5B2N4JH8T13
6C3O5H8T14
7D4P6H8T15
8D4P7J10V18
9E5Q8J10V19
10E5Q9J10V20
11E5Q10
12F6R11
13G7S12
14H8T13
15H8T14
16H8T15
17I9U16
18I9U17
19J10V18
20J10V19
21J10V20
Sheet4
Cell Formulas
RangeFormula
J2:M10J2=FILTER(Table2,ISNUMBER(XMATCH(Table2[User],Table3[UserList],0)))
Dynamic array formulas.
 
Upvote 1
You can also select a range larger than you need (without going to over the top)
Excel Formula:
=FILTER(A2:D5000,ISNUMBER(XMATCH(A2:A5000,G2:G5,0)))
 
Upvote 0
You can also select a range larger than you need (without going to over the top)
Excel Formula:
=FILTER(A2:D5000,ISNUMBER(XMATCH(A2:A5000,G2:G5,0)))
Thanks for your input Fluff. Both ways actually work really well
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,217
Members
453,024
Latest member
Wingit77

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