Look up to return next matching value from list

mjayz

New Member
Joined
Sep 18, 2009
Messages
30
Office Version
  1. 2013
Hi

I trying to return a value into column B, (like a vlookup using column A) from a list in another tab but I want to get a unique result. The next one in the list. So the result would look like this...

Screenshot 2021-04-29 131059.png


... from a list like this

Screenshot 2021-04-29 131517.png


Any help is appreciated as always.

MJ
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Update your profile to indicate what version of Excel you are using as results could vary depending on the version.
Must you have a formula or would VBA work as well?
 
Upvote 0
In 365, is that what you want?

Book4
ABCDE
1Size ANext ResltLookup List
2Size A1001Size A1001
3Size A1004Size B1002
4Size A1005Size C1003
5Size A1006Size A1004
6Size A1005
7Size A1006
8Size B1007
9Size C1008
Sheet5
Cell Formulas
RangeFormula
A2:A5A2=FILTER(D2:D20,D2:D20=A1)
B2:B5B2=FILTER(E2:E20,D2:D20=A1,"")
Dynamic array formulas.


Book4
AB
1Size CNext Reslt
2Size C1003
3Size C1008
Sheet5
Cell Formulas
RangeFormula
A2:A3A2=FILTER(D2:D20,D2:D20=A1)
B2:B3B2=FILTER(E2:E20,D2:D20=A1,"")
Dynamic array formulas.
 
Upvote 0
Update your profile to indicate what version of Excel you are using as results could vary depending on the version.
Must you have a formula or would VBA work as well?
I've updated profile. I'm using 2013. Trying to avoid VBA if possible so a formula would be better. Thanks for responding.
 
Upvote 0
In 365, is that what you want?

Book4
ABCDE
1Size ANext ResltLookup List
2Size A1001Size A1001
3Size A1004Size B1002
4Size A1005Size C1003
5Size A1006Size A1004
6Size A1005
7Size A1006
8Size B1007
9Size C1008
Sheet5
Cell Formulas
RangeFormula
A2:A5A2=FILTER(D2:D20,D2:D20=A1)
B2:B5B2=FILTER(E2:E20,D2:D20=A1,"")
Dynamic array formulas.


Book4
AB
1Size CNext Reslt
2Size C1003
3Size C1008
Sheet5
Cell Formulas
RangeFormula
A2:A3A2=FILTER(D2:D20,D2:D20=A1)
B2:B3B2=FILTER(E2:E20,D2:D20=A1,"")
Dynamic array formulas.
I assume "filter" function is not available in 2013 as I can't find it in the search list??
Thank you.
 
Upvote 0
How about
+Fluff 1.xlsm
ABCDE
1SizesNext ResltLookup List
2Size A1001Size A1001
3Size A1004Size B1002
4Size A1005Size C1003
5Size A1006Size A1004
6Size Ano moreSize A1005
7Size B1002Size A1006
8Size C1003Size B1007
9Size C1008
10
Main
Cell Formulas
RangeFormula
B2:B8B2=IFERROR(INDEX($E$2:$E$9,AGGREGATE(15,6,(ROW($E$2:$E$9)-ROW($E$2)+1)/($D$2:$D$9=A2),COUNTIFS(A$2:A2,A2))),"no more")
 
Upvote 0
How about
+Fluff 1.xlsm
ABCDE
1SizesNext ResltLookup List
2Size A1001Size A1001
3Size A1004Size B1002
4Size A1005Size C1003
5Size A1006Size A1004
6Size Ano moreSize A1005
7Size B1002Size A1006
8Size C1003Size B1007
9Size C1008
10
Main
Cell Formulas
RangeFormula
B2:B8B2=IFERROR(INDEX($E$2:$E$9,AGGREGATE(15,6,(ROW($E$2:$E$9)-ROW($E$2)+1)/($D$2:$D$9=A2),COUNTIFS(A$2:A2,A2))),"no more")
This works an absolute treat!! Thank you very much for your effort. Appreciated as always.

MJ
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,895
Members
449,097
Latest member
dbomb1414

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