ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   SUM does report correctly (https://www.excelbanter.com/excel-programming/415090-sum-does-report-correctly.html)

AMaleThing

SUM does report correctly
 
When using SUM() it reports 0, instead of 150.

The 3 cells I'm calculating are VLOOKUPs which equal 50, 50, 50. I
then use SUM(C27:C29) to report the total. This however reports 0.
If I override the VLOOKUP formula by entering 50 in each cell, I then
get the correct value using SUM.


Why is this happening? I'm using the exact formula elsewhere in the
spreadsheet and it works fine. I'm at a bit of a loss.


Thank you.


These are the exact formulas used:
=IF(C2="", "", VLOOKUP(C$2, ProCentre!$I$9:$K$30, 2, FALSE))
=IF(C2="", "", SUM(C27:C29))

Bob Phillips[_3_]

SUM does report correctly
 
Perhaps it is returning text. Try this

=SUMPRODUCT(--(C27:C29))

--
__________________________________
HTH

Bob

"AMaleThing" wrote in message
...
When using SUM() it reports 0, instead of 150.

The 3 cells I'm calculating are VLOOKUPs which equal 50, 50, 50. I
then use SUM(C27:C29) to report the total. This however reports 0.
If I override the VLOOKUP formula by entering 50 in each cell, I then
get the correct value using SUM.


Why is this happening? I'm using the exact formula elsewhere in the
spreadsheet and it works fine. I'm at a bit of a loss.


Thank you.


These are the exact formulas used:
=IF(C2="", "", VLOOKUP(C$2, ProCentre!$I$9:$K$30, 2, FALSE))
=IF(C2="", "", SUM(C27:C29))




Mike H

SUM does report correctly
 
Hi,

The most likely reason is that the vlookup is returning something that looks
like a number but is really text. Try this on the 'number' returned by vlookup

=ISNUMBER(C27)
If it evaluates as false then check your data.

Mike


"AMaleThing" wrote:

When using SUM() it reports 0, instead of 150.

The 3 cells I'm calculating are VLOOKUPs which equal 50, 50, 50. I
then use SUM(C27:C29) to report the total. This however reports 0.
If I override the VLOOKUP formula by entering 50 in each cell, I then
get the correct value using SUM.


Why is this happening? I'm using the exact formula elsewhere in the
spreadsheet and it works fine. I'm at a bit of a loss.


Thank you.


These are the exact formulas used:
=IF(C2="", "", VLOOKUP(C$2, ProCentre!$I$9:$K$30, 2, FALSE))
=IF(C2="", "", SUM(C27:C29))



All times are GMT +1. The time now is 06:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com