How to use Filter with multiple criteria

jayjay123

New Member
Joined
Jun 3, 2021
Messages
45
Office Version
  1. 365
Platform
  1. Windows
Hi there,

This is a work question (using 365), so I've tried to recreate mock data on my home laptop. So unfortunately the FILTER function doesn't work on my mac.

Heres a mock data set:

DateDescription 1Description 2Description 3Combined 1+2+3Amount
10/10/21​
MERCH 9812374 10.10BOB MARLEYRejectedMERCH 9812374 10.10 BOB MARLEY Rejected
560​
28/10/21​
RJ 7395821 28.10HARRY JAMESPayment StopRJ 7395821 28.10 HARRY JAMES Payment Stop
835​
31/10/21​
RJ 9812374 31.10Payment StopRJ 9812374 31.10 Payment Stop
-340​
1/11/21​
MERCH 9812374 1.11BOB MARLEYRejectedMERCH 9812374 1.11 BOB MARLEY Rejected
300​
3/11/21​
SETT 9812374 3.11BOB MARLEYClosedSETT 9812374 3.11 BOB MARLEY Closed
250​
27/11/21​
RJ 9812374 31.10Payment StopRJ 9812374 31.10 Payment Stop
-340​
2/12/21​
RJ 9812374 2.12Payment StopRJ 9812374 2.12 Payment Stop
-250​

In this example, BOB MARLEY is linked to the ID: 9812374
NAMEID
BOB MARLEY
9812374​


From the dataset, in Excel 365, I have used the filter/index function and have successfully created a dropdown list to search based on the BOB MARLEY (Description 2 - Name).

NameBOB MARLEY
10/10/21​
MERCH 9812374 10.10 BOB MARLEY Rejected
560​
1/11/21​
MERCH 9812374 1.11 BOB MARLEY Rejected
300​
3/11/21​
SETT 9812374 3.11 BOB MARLEY Closed
250​

However, I would like to capture transactions with the ID related to Bob as well. These transactions are missing:

31/10/21​
RJ 9812374 31.10 Payment Stop
-340​
27/11/21​
RJ 9812374 31.10 Payment Stop
-340​
2/12/21​
RJ 9812374 2.12 Payment Stop
-250​

What I would like to achieve is, a drop down menu where I can select / retrieve multiple criteria...so both BOB MARLET & ID 9812374. In an ideal scenario, I'd love it to pick up all the transactions like below:

NameBOB MARLEY
10/10/21​
MERCH 9812374 10.10 BOB MARLEY Rejected
560​
1/11/21​
MERCH 9812374 1.11 BOB MARLEY Rejected
300​
3/11/21​
SETT 9812374 3.11 BOB MARLEY Closed
250​
31/10/21​
RJ 9812374 31.10 Payment Stop
-340​
27/11/21​
RJ 9812374 31.10 Payment Stop
-340​
2/12/21​
RJ 9812374 2.12 Payment Stop
-250​

Is there a way to do this without VBA & just use excel formulas?

Thanks for your help!!
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Does this help?
Book1
ABCDEF
1DateDescription 1Description 2Description 3Combined 1+2+3Amount
210/10/2021MERCH 9812374 10.10BOB MARLEYRejectedMERCH 9812374 10.10 BOB MARLEY Rejected560
328/10/2021RJ 7395821 28.10HARRY JAMESPayment StopRJ 7395821 28.10 HARRY JAMES Payment Stop835
431/10/2021RJ 9812374 31.10Payment StopRJ 9812374 31.10 Payment Stop-340
501/11/2021MERCH 9812374 1.11BOB MARLEYRejectedMERCH 9812374 1.11 BOB MARLEY Rejected300
603/11/2021SETT 9812374 3.11BOB MARLEYClosedSETT 9812374 3.11 BOB MARLEY Closed250
727/11/2021RJ 9812374 31.10Payment StopRJ 9812374 31.10 Payment Stop-340
802/12/2021RJ 9812374 2.12Payment StopRJ 9812374 2.12 Payment Stop-250
9
10
11
12NAMEIDMERCH 9812374 10.10 BOB MARLEY Rejected560
13BOB MARLEY9812374RJ 9812374 31.10 Payment Stop-340
14MERCH 9812374 1.11 BOB MARLEY Rejected300
15SETT 9812374 3.11 BOB MARLEY Closed250
16RJ 9812374 31.10 Payment Stop-340
17RJ 9812374 2.12 Payment Stop-250
Sheet1
Cell Formulas
RangeFormula
E12:F17E12=FILTER(E2:F8,ISNUMBER(SEARCH(A13,E2:E8))+ISNUMBER(SEARCH(B13,E2:E8)),"Not found")
Dynamic array formulas.
 
Upvote 0
Wow thanks so much! is there a way to incorporate the corresponding date in the beginning as well?
Employees copy and paste the ID from a database and sometimes the ID contains 00 in front. For example "009812374". Is it possible to amend the formula so that it picks up the digits not including 00?

Thanks for your help @jasonb75. you're amazing!
 
Upvote 0
Is this what you are after?

21 12 06.xlsm
ABCDEF
1DateDescription 1Description 2Description 3Combined 1+2+3Amount
210/10/2021MERCH 9812374 10.10BOB MARLEYRejectedMERCH 9812374 10.10 BOB MARLEY Rejected560
328/10/2021RJ 7395821 28.10HARRY JAMESPayment StopRJ 7395821 28.10 HARRY JAMES Payment Stop835
431/10/2021RJ 9812374 31.10Payment StopRJ 9812374 31.10 Payment Stop-340
51/11/2021MERCH 9812374 1.11BOB MARLEYRejectedMERCH 9812374 1.11 BOB MARLEY Rejected300
63/11/2021SETT 9812374 3.11BOB MARLEYClosedSETT 9812374 3.11 BOB MARLEY Closed250
727/11/2021RJ 9812374 31.10Payment StopRJ 9812374 31.10 Payment Stop-340
82/12/2021RJ 9812374 2.12Payment StopRJ 9812374 2.12 Payment Stop-250
9
10
11
12NAMEIDDateCombined 1+2+3Amount
13BOB MARLEY981237410/10/2021MERCH 9812374 10.10 BOB MARLEY Rejected560
1431/10/2021RJ 9812374 31.10 Payment Stop-340
151/11/2021MERCH 9812374 1.11 BOB MARLEY Rejected300
163/11/2021SETT 9812374 3.11 BOB MARLEY Closed250
1727/11/2021RJ 9812374 31.10 Payment Stop-340
182/12/2021RJ 9812374 2.12 Payment Stop-250
19
FILTER
Cell Formulas
RangeFormula
D13:F18D13=FILTER(FILTER(A2:F8,(C2:C8=A13)+ISNUMBER(FIND(B13,B2:B8)),""),COUNTIF(D12:F12,A1:F1))
Dynamic array formulas.
 
Upvote 0
Solution

Forum statistics

Threads
1,223,886
Messages
6,175,193
Members
452,616
Latest member
intern444

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