Data entered from list automatically enters number in another cell

G

gbryce

I am using Excel 2007 and here is an simplified example of what I need.


Items Price

Potatoes 4.35
Apples 5.55
Oranges 7.95
Onions 4.55
Carrots 3.75


Items Column is List for Valid entries in table below

Prices are the numbers I want entered when I enter the Item

If I enter Oranges from Dropdown List in A16 , I want Excel to automatically
enter the number 7.95 3 columns over in D16,or if it is quite a bit easier,
just 1 column over in cell B16

Example of table I want:

My Entries: Excel Enters

A16 Carrots D16 3.75
A17 Oranges D17 7.95
A18 Onions D18 4.55
A19 Onions D19 4.55
A20 Potatoes D20 4.35


Thanks so much for your help !
 
P

Pete_UK

Put this in D16:

=VLOOKUP(A16,A$2:B$6,2,0)

then copy down.

If you want it a bit more robust, then you will need something like
this:

=IF(A16="","",IF(ISNA(VLOOKUP(A16,A$2:B$6,2,0)),"",VLOOKUP(A16,A$2:B
$6,2,0)))

Hope this helps.

Pete
 
G

gbryce

I had never used VLOOKUP function before but now I am beginning to understand
how it works. It is exactly what I was needing. Thanks Guys.
 
P

Pete_UK

You're welcome - thanks for feeding back.

Pete

I had never used VLOOKUP function before but now I am beginning to understand
how it works. It is exactly what I was needing. Thanks Guys.







- Show quoted text -
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top