Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel Filter Function Include Different Array for Filtering

I wanted to make a filter function, but the array for criteria is referring to a different cell

enter image description here

Here is an example

My array is C3:C17, I wanted to filter the names on this array based on the list from A3:A5 Here I tried using this formula

=FILTER(HSTACK($C$3:$D$17),C3:C17=A3:A17)

I am expecting to return Agent 1, 5 and 10 with their corresponding Leaders on cell F3 but instead the formula only return 1 result which is Agent 1 and Leader 1

Expecting/Desired result

enter image description here

like image 507
Harvey Avatar asked Aug 25 '26 16:08

Harvey


1 Answers

Using ISNUMBER and XMATCH:

=FILTER(C3:D17,ISNUMBER(XMATCH(C3:C17,A3:A5)))

enter image description here

like image 122
BigBen Avatar answered Aug 27 '26 06:08

BigBen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!