Vlookup if more than 1 result

Dazzybeeguy

Board Regular
Joined
Jan 6, 2022
Messages
72
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
If I have a vlookup that in say Cell E2 looks for the Ref i.e A1234 and I want the 2nd column as my result.
The ref A1234 appears 4 times so I want formulas in Cell E3, E4 & E5
Cell E2 Formula =VLOOKUP("A1234",A1:B10,2,FALSE)

How do I get all four results and not the first result 4 times in cells E3:E5

So I want to get the following
E2 = Dig, E3 = Paint, E4 = Iron, E5 = Hoover

Reference (Column A)Task (Column B)
A1234Dig
A1235D
A1234Paint
A1237A
A1238C
A1234Iron
A1240A
A1244C
A1234Hoover
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
if it as described
=FILTER(B2:B10,A2:A10="A1234")
on the 365 version of excel - NOT the 2010 version

Book6
ABCDE
1Reference (Column A)Task (Column B)
2A1234DigDig
3A1235DPaint
4A1234PaintIron
5A1237AHoover
6A1238C
7A1234Iron
8A1240A
9A1244C
10A1234Hoover
Sheet1
Cell Formulas
RangeFormula
E2:E5E2=FILTER(B2:B10,A2:A10="A1234")
Dynamic array formulas.
 
Upvote 0
if it as described
=FILTER(B2:B10,A2:A10="A1234")
on the 365 version of excel - NOT the 2010 version

Book6
ABCDE
1Reference (Column A)Task (Column B)
2A1234DigDig
3A1235DPaint
4A1234PaintIron
5A1237AHoover
6A1238C
7A1234Iron
8A1240A
9A1244C
10A1234Hoover
Sheet1
Cell Formulas
RangeFormula
E2:E5E2=FILTER(B2:B10,A2:A10="A1234")
Dynamic array formulas.
Thanks that works great, just wondering though, if I also wanted it to look at column C for a Y or a N and only return the results if it had a Y, what would the formula be ?

Thanks
 
Upvote 0
=FILTER(B2:B10,(A2:A10="A1234")*(C2:C10="Y"))

Book6
ABCDE
1Reference (Column A)Task (Column B)
2A1234DigYDig
3A1235DnHoover
4A1234Paintn
5A1237Ay
6A1238Cy
7A1234Ironn
8A1240An
9A1244Cn
10A1234Hoovery
Sheet1
Cell Formulas
RangeFormula
E2:E3E2=FILTER(B2:B10,(A2:A10="A1234")*(C2:C10="Y"))
Dynamic array formulas.
 
Upvote 0
Solution
=FILTER(B2:B10,(A2:A10="A1234")*(C2:C10="Y"))

Book6
ABCDE
1Reference (Column A)Task (Column B)
2A1234DigYDig
3A1235DnHoover
4A1234Paintn
5A1237Ay
6A1238Cy
7A1234Ironn
8A1240An
9A1244Cn
10A1234Hoovery
Sheet1
Cell Formulas
RangeFormula
E2:E3E2=FILTER(B2:B10,(A2:A10="A1234")*(C2:C10="Y"))
Dynamic array formulas.
Thank you
 
Upvote 0
not sure i understand Populated ?
 
Upvote 0
you can use sort
=SORT(FILTER(B2:B10,(A2:A10="A1234")*(C2:C10="Y")))

but the items should appear in the order on the main column

so not sure why you are seeing
the next one that has a Y displays at the top,

see below i changed the Y

Book6
ABCDE
1Reference (Column A)Task (Column B)
2A1234DignPaint
3A1235DnHoover
4A1234Painty
5A1237Ay
6A1238Cy
7A1234Ironn
8A1240An
9A1244Cn
10A1234Hoovery
Sheet1
Cell Formulas
RangeFormula
E2:E3E2=FILTER(B2:B10,(A2:A10="A1234")*(C2:C10="Y"))
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,215,106
Messages
6,123,122
Members
449,096
Latest member
provoking

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