Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

how to sum up a calculated column of hours

I need to do what I thought was a simple task - calculating the sum of a column containing hours, calculated from neighbouring cells. In effect, a calculation of work hours.


The cells in the column are calculated as : finish time minus beginning time (C16−B16) i.e. 16:15-9:00 = 7h 15m

Time and date formatted as '"no date", time: 5:15'


I have attempted to calculate the sum of the column containing the calculated values (hours+minutes)' but so far with no luck.

I would love to hear if someone have a solution for this.

MacBook Pro with Retina display, iOS 10.3.2

Posted on Sep 14, 2017 4:09 PM

Reply
Question marked as Best reply

Posted on Sep 14, 2017 10:18 PM

Thanks for the response Wayne.


However, the =sum(D) I cannot use, since there are also other values in the column.


I have found though what was really the problem.

With values in many of the cells not yet being filled in, the calculated value for those cells were 0 (Zero), therefor the error:

"Values being summed by SUM must be either all durations or all numbers, unless one value is a date."


I was certain, - as you also state, that one time minus another time can be summed, and so it can, but not if some sells contain zero values.

I have since been solved this, using : IF(ISBLANK(C16),"",C16−B16

And the durations in the column can now be summed as the column no longer contains zero values.

9 replies
Question marked as Best reply

Sep 14, 2017 10:18 PM in response to Wayne Contello

Thanks for the response Wayne.


However, the =sum(D) I cannot use, since there are also other values in the column.


I have found though what was really the problem.

With values in many of the cells not yet being filled in, the calculated value for those cells were 0 (Zero), therefor the error:

"Values being summed by SUM must be either all durations or all numbers, unless one value is a date."


I was certain, - as you also state, that one time minus another time can be summed, and so it can, but not if some sells contain zero values.

I have since been solved this, using : IF(ISBLANK(C16),"",C16−B16

And the durations in the column can now be summed as the column no longer contains zero values.

Sep 15, 2017 3:25 PM in response to Walentin

"I also see that you noticed my calculation mistake"


Actually, I hadn't. I registered that you were getting a duration result and wanted a numeric result, set up the necessary formula, used the duration value from your example, and assumed Numbers did the math correctly. didn't look back to see if it was the 'expected' result. 😉


Regards,

Barry

how to sum up a calculated column of hours

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.