Validation Lookup problems

JamieDuncan

Board Regular
Joined
Aug 23, 2006
Messages
132
I have a sheet in excel named address book, which can be updated within excel(entry to bottom row) via a userform and a macro auto sorts the sheet.
column A is named =ADDRESSBOOK (this contains company names) so that data validation lists can be used on other sheets, the problem is, when there are 2 or more company names the same with different addresses, the validation lists show both entries but LOOKUP can only take one address from the sheet.

Is there a way to have the lookup taking the correct address dependant on which similar company name is selected.

ie. list shows MyCompany LTD 3 times
if i chose the first instance of MyCompany LTD
LOOKUP brings back London
but if i choose the second instance,
LOOKUP brings back Bristol

this is the formula im using at the moment

=LOOKUP(F10,'Address Book'!A1:A64999,'Address Book'!B1:B64999)

F10 being the validation list
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

mbb4331

Board Regular
Joined
Dec 22, 2005
Messages
152
I would combine the CompanyID and address into a new column with a space between the two.

Then use that for your list and lookup.

Column C = trim(Column A) & " " & trim(Column B)
 

Forum statistics

Threads
1,141,757
Messages
5,708,355
Members
421,566
Latest member
7Nabisco

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
Top