Using an "IF" Function between 2 Worksheets

G

Guest

On one work sheet I have 3 columns listing an item #, the product description
& the price. On the other worksheet is a sales bill where products can be
listed and tallied. Is there an IF formula that allows me to type in any
item
number on the sales bill and have the product description and Price
automatically appear in the adjacent 2 cells. This would be a function I
want to repeat down the Sales Bill until the customer is done selecting
Items. This function, If possible, would save time in retyping Item
descriptions and/or using the cut/copy cell feature. I would like to type a
number in Column "A" and have the product description automatically appear in
Colun "B" and the price automatically appear in Column "C". VLOOKUP does
not appear to work.
 
D

Dave Peterson

If =vlookup() doesn't work, it may be because your key data doesn't really
match.

Debra Dalgleish has some notes at:
http://www.contextures.com/xlFunctions02.html
and troubleshooting notes at:
http://www.contextures.com/xlFunctions02.html#Trouble

But something like:
=vlookup(a2,sheet2!a:c,2,false)

should work

You may want to enhance it a bit:

=if(a2="","",if(iserror(vlookup(a2,sheet2!a:c,2,false)),"Missing",
if(vlookup(a2,sheet2!a:c,2,false)="","",vlookup(a2,sheet2!a:c,2,false))))
 
G

Guest

Thanks Dave. That tip solved my problem. One more question. Do you know if
their is a way to get the information that I am pulling from the first work
sheet to copy in the second with the same font and color ?
 
D

Dave Peterson

You (or a macro) have to do copy|paste (or paste special|formats).

Formulas return values--not formatting.
 

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