I'm getting incorrect sum when adding numbers using sum function

b2 through b5 are numbers. B6 contains formula =sum(b2,b3,b4,b5). Result in B6 does not equal the sum of b2:b5.

Also tried =sum(b2:b5)

edit: two of the cells show black when I turn on value highlighting. But there is no apostrophe in front of the value in those cells.

You have answered your own question; it would seem that some cells are formatted as text and thus won’t be included in the result of your SUM function.

Thank you. I went back and deleted the values in those cell and reentered the numbers. The thing that puzzles me is how they were entered as text in the first place. I believe I entered the number in the first cell and then used the down arrow key to enter the number and move to the second cell. Perhaps using the arrow keys is a factor?

Unlikely to be the arrow keys. Lack of apostrophe suggests cells may be formatted as text; perhaps check that?

When pasted in a cell formated as number from a cell formated as text, cell content behave as text until edited or retyped.


Add Answer is reserved for solutions.

Press edit below your question if you want to add more information; also can comment an answer.

Check the mark (Correct answer mark) to the left of the answer that solves your question.