#VALUE! when trying to sum from a VLOOKUP

S

Supe

I have a spreadsheet that brings over data from a VLOOKUP. I was trying to
add a column that would calcluate a total by multiplying the ON HAND cell by
the COST Cell. Both cells are results from the VLOOKUP. I used an IF
formual where if the ON HAND cell was greanter than 0, then mutiply the ON
HAND cell by the COST cell. It works fine if there is data in the ON HAND
column, but if that column is blank than I get #VALUE! in the cell. Is there
a way to have the result come up blank or 0 if there is no data in the ON
HAND column?
 
F

fredg

It's done using ISERROR like this
=IF(ISERROR(VLOOKUP(A1,A3:C8,2,FALSE)),0,VLOOKUP(A1,A3:C8,2,FALSE))

Excuse me, but why are you asking an Excel question in an Access Forms
newsgroup?

The access in this groups title refers to Microsoft Access, a database
program.
Please repost to the correct newsgroup for the program you are using.
I would suggest you include your Windows and Office version number in
your message. It might make a difference.
 

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