Help with a combobox and array

J

Jools

Can someone offer me some assistance please. I apologise in advance i
this is a really stupid question but I'm a relative newbie to Excel.

I've attached a sample file if anyone will take a look but I will tr
to explain what I'm trying to achieve.

I have a 2 column array (cells F2:G10) - in the first column is th
name of a town and in the second column is a price.

All I want to do (famous last words) is set up a combo box in cell B
which reads column 1 (town) from the array. When the end user select
a particular town I then want the relating price to appear in cell C
immediately to the right.

I've spent ages trying to figure it out - I've got to the point no
where I think I'm trying too hard to find the answer!

Attachment filename: book1.xls
Download attachment: http://www.excelforum.com/attachment.php?postid=65530
 
M

Mike Lewis

Here is one way:

Set up cell B3 with "Data Validation", choose the "List"
option with Cells F2 to F10 as the "Source" - check the in
cell drop down box. This will give you something like
a "combobox".

Then in Cell C3 enter the formula: =Vlookup
(B3,F2:G10,2,false)this will return the cost associated
with the city.

Good Luck

Mike
 
J

Jools

Many thanks for your advice Mike.

After I'd posted the thread and having trawled through this forum
looked at the very excellent Contextures site and found the exac
solution I was looking for under the Funtions listing.

So easy when you know how!! I've now managed to get my little sampl
spreadsheet to work so now onto the bigger stuff.

Once again many thanks.

If anyone has a similar problem to the one I had, check out this lin
http://www.contextures.com/excelfiles.html#Function and look fo
ComboBox Selection.

One again, many thanks. :)

Juli
 
Top