INDEX, MATCH or VLOOKUP?

mrroland

Active Member
Joined
Apr 29, 2002
Messages
294
Hi,

I like to know what is the best way to create a standard form in where I can select a customer by means of a drop down menu (which I can not show on the attached example) and have all data returned from a source which is usually hidden on a different sheet. The cell link of the drop down menu is E12.

Basically the values B6:B12 will match the values F5:L5. In this example customer 2 is selected. I would like that in the range c6:c12 the values are returned of F7:L7

See attached example.
Example.xls
ABCDEFGHIJKLM
1111111111111111111111111111111111111111
2111111111111111111111111111111111111111
3111111111111111111111111111111111111111
4111111111111Source (normally on a different sheet)111111111111111111111111
5111111Result of customer 2111SiteBuildingAddressPlacePost CodeCountryPhoneFax111
6111Buildingzzz111Customer 1aaabbbcccdddeeefffggg111
7111Addressyyy111Customer 2zzzyyyxxxwwwvvvuuuttt111
8111Placexxx111Customer 3abcdefghijklmnopqrstu111
9111Post Codewww111Customer 4qwertyuioplkjhgfdssaz111
10111Countryvvv111Customer 5edcwsxqazvbnmkjhygzxc111
11111Phoneuuu111111111111111111111111111111
12111Faxttt1112111111111111111111111111
13111111111111111111111111111111111111111
14111111111111111111111111111111111111111
15111111111111111111111111111111111111111
Example

I hope the example is clear. I will be happy to give any of you more information
Your help is greatly appreciated.

Kind regards,

Roland
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
you can do both a HLOOKUP and VLOOKUP in one formula (or match etc)

eg

=VLOOKUP(customer cell ref,data range, HLOOKUP(criteria - cell ref),data range,row number of titles,0),0)
 
Upvote 0
Alladin,

Your formual worked when i changed it to =VLOOKUP($C$5,$E$5:$L$10,MATCH(B6,$E$5:$L$5,0),0) but what I would like is to make this go automatically with a pull down menu (could not get this on the example) For example if I select customer 1 the data of this customer is returned in range C6:C12, but if I select cutomer 3 I want the data of customer 3 to be returned in range C6:C12

Many thanks for helping me so far.

Roland
 
Upvote 0
Aladin's formula is working off the assumption that C5 is the linked cell to the combo box value - ie 1,2,3 etc...
 
Upvote 0
Aladin,
I have used the same process with our Customer DB containing over 2000 entries. As the coloum headings are fixed wouldn't it be quicker (on bigger arrays) to change the ,MATCH(B6,$E$5:$L$5,0), in each row of the display area with the col_index_num. eg.Building =2, Address =3?
 
Upvote 0
Northerner said:
Aladin,
I have used the same process with our Customer DB containing over 2000 entries. As the coloum headings are fixed wouldn't it be quicker (on bigger arrays) to change the ,MATCH(B6,$E$5:$L$5,0), in each row of the display area with the col_index_num. eg.Building =2, Address =3?

Yes, definitely.
 
Upvote 0

Forum statistics

Threads
1,221,693
Messages
6,161,356
Members
451,697
Latest member
pedroDH

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