ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Insert a specific address from a list if the contents of cell A1=x (https://www.excelbanter.com/excel-worksheet-functions/201366-insert-specific-address-list-if-contents-cell-a1%3Dx.html)

Anne

Insert a specific address from a list if the contents of cell A1=x
 
Cell A1 is for school name. Used Data Validation to provide a drop down list
to choose school name. Cell A2 is for school address. Would like a school's
address (from a list) to be inserted when that school's name is selected in
A1.

Peo Sjoblom[_2_]

Insert a specific address from a list if the contents of cell A1=x
 
=IF(A1="","",VLOOKUP(A1,School_address_table,2,0))

where School_address_table is a table with the school's name in the leftmost
column and the address in column 2

For instance if you put all the school names in Sheet2 column A and their
respective addresses in column B it would look like

=IF(A1="","",VLOOKUP(A1,Sheet2!A:B,2,0))


Lookup VLOOKUP in help


--


Regards,


Peo Sjoblom

"Anne" wrote in message
...
Cell A1 is for school name. Used Data Validation to provide a drop down
list
to choose school name. Cell A2 is for school address. Would like a
school's
address (from a list) to be inserted when that school's name is selected
in
A1.





All times are GMT +1. The time now is 09:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com