Summing Numbers

P

Peter Pan

Hi All


I'm adding three numbers in cells A1, B1, C1.


When I sum the three cells I get the wrong answer. =sum(A1:C1)


When I add the cells it provides the correct answer. =A1+B1+C1


I have checked the the cell format which confirms the data is a number.



However the helpful error checker (not) tells me that the cell is
formated
as text (which it is'nt). Either way the addition of the three cells
still
works, which would not be the case if one of the cells was text.


Any help greatly appreciated.


Peter Pan
 
D

Dave Peterson

Try this in an empty cell.

=count(a1:c1)

This will return the quantity of numbers you have in that range.

You can also use:
=isnumber(a1)
to isolate the problem cell.

If you type '1, '2, '3 in A1:C1 (with the apostrophes), then excel usually treat
these numbers like text. =sum() will not include them.

But =a1+b1+c1
will coerce anything that looks like a number into a number and you get the
answer you want.

Checking the format of the cell isn't the same as checking the value in the
cell.

If the cell was formatted as text before you entered the value, then changing
cell's format to General (or some other number format), then reentering the
value (F2 followed by enter is enough) will convert the value to a number.
 
Top