Vlookup to provide multiple results for 1 option

Hutchcove

New Member
Joined
Feb 22, 2015
Messages
9
Hi all, Newbie with Excel and looking to create a dispatch database. I was told Vlookup was the function of choice. See table below:
What I want to do is have a 3 colums to the left of this hidden data with CITY, PRIMARY & 2NDARY as headers. A1 - City & Then B1 & C1 will provide the details from F1 & G1

I'm assuming this is simple but I can't seem to grasp the Vlookup tool. For all I know there is a better tool. All I do know is that using any VB coding is out of scope for me. Hoping this can be done with a couple of formulas.

Any assistance would be greatly appreciated.

E F G
CITY PRIMARY 2NDARY
[TABLE="width: 349"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]Alma[/TD]
[TD]Progitech[/TD]
[TD]None[/TD]
[/TR]
[TR]
[TD]Amos[/TD]
[TD]Progitech[/TD]
[TD]None[/TD]
[/TR]
[TR]
[TD]Ancienne-Lorette[/TD]
[TD]Elias[/TD]
[TD]Microage QC[/TD]
[/TR]
[TR]
[TD]Ancienne-Lorette[/TD]
[TD]Elias[/TD]
[TD]Microage QC[/TD]
[/TR]
[TR]
[TD]Ange-Gardien[/TD]
[TD]Gilberto[/TD]
[TD]Jason[/TD]
[/TR]
[TR]
[TD]Anjou[/TD]
[TD]New Hire[/TD]
[TD]Jason[/TD]
[/TR]
[TR]
[TD]Anjou[/TD]
[TD]New Hire[/TD]
[TD]Jason[/TD]
[/TR]
[TR]
[TD]Asbestos[/TD]
[TD]Elias[/TD]
[TD]Progitech[/TD]
[/TR]
[TR]
[TD]Ascot-Corner[/TD]
[TD]Progitech[/TD]
[TD]Microage QC[/TD]
[/TR]
[TR]
[TD]Ayers Cliff[/TD]
[TD]Gilberto[/TD]
[TD]Progitech[/TD]
[/TR]
[TR]
[TD]Ayer's Cliff[/TD]
[TD]Gilberto[/TD]
[TD]Progitech[/TD]
[/TR]
[TR]
[TD]Ayer's Cliff[/TD]
[TD]Gilberto[/TD]
[TD]Progitech[/TD]
[/TR]
[TR]
[TD]Baie Comeau[/TD]
[TD]Progitech[/TD]
[TD]None[/TD]
[/TR]
[TR]
[TD]Baie Comeau[/TD]
[TD]Progitech[/TD]
[TD]None[/TD]
[/TR]
[TR]
[TD]Baie Comeau[/TD]
[TD]Progitech[/TD]
[TD]None[/TD]
[/TR]
[TR]
[TD]Baie Comeau[/TD]
[TD]Progitech[/TD]
[TD]None[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Try:


Book1
ABCDEFG
1CityPrimary2ndaryCITYPrimary2ndary
2AnjouNew HireJasonAlmaProgitechNone
3AmosProgitechNoneAmosProgitechNone
4Baie ComeauProgitechNoneAncienne-LoretteEliasMicroage QC
5Ancienne-LoretteEliasMicroage QC
6Ange-GardienGilbertoJason
7AnjouNew HireJason
8AnjouNew HireJason
9AsbestosEliasProgitech
10Ascot-CornerProgitechMicroage QC
11Ayers CliffGilbertoProgitech
12Ayer's CliffGilbertoProgitech
13Ayer's CliffGilbertoProgitech
14Baie ComeauProgitechNone
15Baie ComeauProgitechNone
16Baie ComeauProgitechNone
17Baie ComeauProgitechNone
Sheet5
Cell Formulas
RangeFormula
B2=VLOOKUP($A2,$E$1:$G$17,MATCH(B$1,$E$1:$G$1,0))


Enter the formula in B2. Copy to C2. Then copy both of them down the column as far as needed.
 
Upvote 0
Thank you very much. This definitely did the trick. Didn't catch the concept of the Vlookup but not that I follow the formula with the table - makes perfect sense. A BIG THANK YOU


Try:

ABCDEFG
CityPrimary2ndaryCITYPrimary2ndary
AnjouNew HireJasonAlmaProgitechNone
AmosProgitechNoneAmosProgitechNone
Baie ComeauProgitechNoneAncienne-LoretteEliasMicroage QC
Ancienne-LoretteEliasMicroage QC
Ange-GardienGilbertoJason
AnjouNew HireJason
AnjouNew HireJason
AsbestosEliasProgitech
Ascot-CornerProgitechMicroage QC
Ayers CliffGilbertoProgitech
Ayer's CliffGilbertoProgitech
Ayer's CliffGilbertoProgitech
Baie ComeauProgitechNone
Baie ComeauProgitechNone
Baie ComeauProgitechNone
Baie ComeauProgitechNone

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: right"][/TD]

[TD="align: center"]2[/TD]

[TD="align: right"][/TD]

[TD="align: center"]3[/TD]

[TD="align: right"][/TD]

[TD="align: center"]4[/TD]

[TD="align: right"][/TD]

[TD="align: center"]5[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]6[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]7[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]8[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]9[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]10[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]11[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]12[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]13[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]14[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]15[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]16[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]17[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

</tbody>
Sheet5

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]B2[/TH]
[TD="align: left"]=VLOOKUP($A2,$E$1:$G$17,MATCH(B$1,$E$1:$G$1,0))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]



Enter the formula in B2. Copy to C2. Then copy both of them down the column as far as needed.[/QUOTE]
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,170
Members
453,021
Latest member
Justyna P

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