Adding a filter to Vlookup

CV12

Board Regular
Joined
Apr 6, 2020
Messages
82
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hello,

I am trying to add a filter to a vlookup, but not figuring it out.
My input is 5, which corresponds to both 50 and 150 in col B. Is there any way, if my filter input is b, my result will be 150?


Book1
ABCDE
1110a
2220a
3330a
4440a5a
5550a
6660a
7770a
8880a50
9990a
1010100a
111110b
122120b
133130b
144140b
155150b
166160b
177170b
188180b
199190b
2010200b
Sheet1
Cell Formulas
RangeFormula
D8D8=VLOOKUP(D4,A1:B20,2)



Thanks a lot
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
How about (for 365)
Excel Formula:
=FILTER(B1:B20,(A1:A20=D4)*(C1:C20=E4))
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0
In addition to this,

Was it not possible to use spilled data on a filter formula. I thought the filter function was one of the functions that could be used with spilled data?

Book1
ABCDEFGHI
1110a1#N/A
2220a2
3330a3
4440ab4
5550a5
6660a6
7770a7
8880a8
9990a9
1010100a10
111110b
122120b
133130b
144140b
155150b
166160b1
177170b2
188180b3
199190b4
2010200b5
216
227
238
249
25#
26
Sheet1
Cell Formulas
RangeFormula
G1:G10G1=SORT(I16:I25)
H1H1=FILTER($B$1:$B$20,($A$1:$A$20=G1#)*($C$1:$C$20=$E$4))
Dynamic array formulas.
 
Upvote 0
You would need to use it like
Excel Formula:
=FILTER($B$1:$B$20,(ISNUMBER(MATCH($A$1:$A$20,G1#,0)))*($C$1:$C$20=$E$4))
 
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,523
Messages
6,125,319
Members
449,218
Latest member
Excel Master

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