#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?
 
T

Timbo

I don't know what the cell references are but of the ON HAND was in cel
C4 and the cost in cell D4 this sum would overcome the problem if th
result of the calculation in C4 was 0.

=IF(C4>0,C4*D4,0
 
S

Simon Lloyd

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

Supe;277407 said:
I have a spreadsheet that brings over data from a VLOOKUP. I was tryin
t
add a column that would calcluate a total by multiplying the ON HAN
cell b
the COST Cell. Both cells are results from the VLOOKUP. I used an I
formual where if the ON HAND cell was greanter than 0, then mutiply th
O
HAND cell by the COST cell. It works fine if there is data in the O
HAN
column, but if that column is blank than I get #VALUE! in the cell. I
ther
a way to have the result come up blank or 0 if there is no data in th
O
HAND column

--
Simon Lloy

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com
 
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