excel vba 97 - "If" question and how to associate

C

chief

i have a drop-down list set up in cell C19 where a user can choose fro
product code #'s ranging from "1-0001" onward. I would like to set u
a code that will enable the user to:

1.pull down drop list and select a code # (this i have)
2.once that # is selected, the corresponding product description wil
be placed in E19.
3.further more, the corresponding # or description will then b
recognized and will automatically input the corresponding Price ($) i
I19.

It is in hopes of saving the user time from having to type in th
product, then the price etc.

Just a note, i have validated my drop down code list (which sits i
cell C19) from column N. I also have the corresponding descriptions i
column O. I don't know if this helps?

I tried If range("C19").value = "1-0001" Then
range("E19").value = nails
End if

but it won't do anything once you choose that 1-0001 code #?

thank
 
F

Frank Kabel

Hi
use VLOOKUP for this. e.g. in E19
=IF(C19<>"",VLOOKUP(C19,$N$1:$O$100,2,0),"",)
 
C

chief

Thanks alot Frank, that worked out great. If I then wanted to take i
one step further and have the appropriate price come up when the cod
is chosen, am i right to assume i would just put the same code into I1
(price cell) and it would perform the same function if a list were se
up on the page?

Again thanks for the hel
 

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