VLOOKUP Alternative-Multiple Vales

silverlucky5

New Member
Joined
Sep 8, 2009
Messages
35
Hi All,
Hoping someone can help me out :)
I have the following lookup table.
ABC
1BranchCityMaterial
2Branch1AtlantaPaper
3Branch1AtlantaCloth
4Branch1AtlantaWood
5Branch2BostonCardboard
6Branch3DallasPlastic

<tbody>
</tbody>











I want to look up the values shown in "Lookup Value" column below and return results (from Lookup Table) as shown below. (FYI: There doesn't necessarily have to be a blank in "Lookup Value" column for the other 2 "Atlanta" results and the multiple results don't have to be in any particular order.)
ABC
1Lookup ValueResult1Result2
2Branch2BostonCardboard
3Branch3DallasPlastic
4Branch1AtlantaPaper
5AtlantaCloth
6AtlantaWood

<tbody>
</tbody>











I know VLOOKUP will only return the first value of Atlanta as shown below. I have tried all kinds of formulas with MATCH and SMALL and INDEX but I'm not having too much luck. :eek:
ABC
1Lookup ValueResult1Result2
2Branch2BostonCardboard
3Branch3DallasPlastic
4Branch1AtlantaPaper

<tbody>
</tbody>








Does anyone know how I would create a formula (preferred) or a macro to do this?
Thank you!
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Also, another caution. Because of some of the absolute references, you can't just add a new row to the bottom of the source table or add a lookup value beyond row 10. I will experiment with removing the absolute references in question and see if that works. In the meantime, my workaround is to cut and paste the "last" rows down and adding the new values above it.
 
Upvote 0
.. you can't just add a new row to the bottom of the source table or add a lookup value beyond row 10.
Here are 2 solutions to that using the same sort of method I used above.

Method A
With exactly the same layout as before ..
i) Change all $10 references in the formulas in E2, F2 and J2 to 100 or 1000 or whatever is a 'reasonable' number to ensure it will cover any expansion you might do without going overboard.
ii) E2 and J2 are copied down "as far as you might ever need"
iii) F2 is copied across to G2 and down to the same row you copied E2 & J2


Method B
Still the same layout as before, but ..
i) Select all the data currently in columns A:C (that would be A1:C10 in the sample given previously).
ii) On the Insert ribbon tab choose Table -> My table has headers -> OK
iii) J1 still holds a manually entered 1
iv) All of the formulas shown below are copied down "as far as you might ever need"

Now, if you add extra data in columns A:C, the table will automatically expand to include that data & the formulas will also include that extra data.

Excel Workbook
ABCDEFGHIJ
1BranchCityMaterialLookup ResultResult1Result2Lookup Value1
2Branch1AtlantaPaperBranch2BostonCardboardBranch21
3Branch1AtlantaClothBranch3DallasPlasticBranch32
4Branch1AtlantaWoodBranch3DallasClothBranch14
5Branch2BostonCardboardBranch1AtlantaPaper7
6Branch3DallasPlasticBranch1AtlantaCloth
7Branch4New YorkPaperBranch1AtlantaWood
8Branch3DallasCloth
9Branch5AtlantaStone
10Branch99MiamiCloth
11
Lookup (2)
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,717
Members
448,985
Latest member
chocbudda

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