Build a table on another worksheet.
Put all the cities in column A
and put the codes in column B
And sort both those columns by column A (and sort it each time you update that
list)
Then use data|validation to get the dropdown options on your other sheet.
Take a look at Debra Dalgleish's site:
http://contextures.com/xlDataVal01.html
for more info about data|validation.
Then use an adjacent cell and put this formula (I used A1 to hold my
data|validation cell):
=if(a1="","",vlookup(a1,sheet2!a:b,2,false))
For more info about =vlookup()...
You could look at Debra Dalgleish's site:
http://www.contextures.com/xlFunctions02.html
striker_69 wrote:
I have a list of names of cities (Moscow, Ottawa, Toronto, and
Washington DC)
and
a list of corresponding phone codes:
Moscow: +7 (095)
Ottawa: +1 (613)
Toronto: +1 (416)
Washington DC: +1 (202)
I need to make a drop down list in a cell which would work as follows:
when I click on it, I will see the dropdown list of cities
(alphabetical) but when I select a city I want to get the phone code in
the cell (numerical).
I am a novice in Excel, but I need to figure it out quite urgently, so
if someone can help I'd really appreciate that.
I am currently reading the book entitled "The Bible of Excel 2003" but
can't find an answer (although I'm sure it's there) because I can't
properly make a search query as I'm not a native English-speaking
person.
--
striker_69
------------------------------------------------------------------------
striker_69's Profile: http://www.excelforum.com/member.php...o&userid=27353
View this thread: http://www.excelforum.com/showthread...hreadid=468597
--
Dave Peterson