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

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
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)
 
Upvote 0

Forum statistics

Threads
1,214,642
Messages
6,120,698
Members
448,979
Latest member
DET4492

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