Sum of durations
How can I add the column of durations
How can I add the column of durations
Durations can be summed with SUM just like number values.
However, all values to be summed must be duration values. Your issue is that rows with no duration values result 0.0, formatted as a numerical value.
There are two workarounds for this. The simple way would be to select the whole column and change the data format to duration. 0.0 will change to 0d, and your SUM formula will work.
The better way would be to replace these values with a null string. This would be done by adding an IF formula to each cell in the column. Assuming your duration column is Z, your current formula is presumably:
Z=Y-X
Change this to:
Z=IF(Y=“”,””,Y-X)
This will check to see if there is data in the “ending time” column and will only perform the subtraction if there is. Otherwise, the cell will appear empty. The actual contents will be a null string, represented as an empty set of quotation marks. These null strings will not interfere when you sum the column with SUM.
Durations can be summed with SUM just like number values.
However, all values to be summed must be duration values. Your issue is that rows with no duration values result 0.0, formatted as a numerical value.
There are two workarounds for this. The simple way would be to select the whole column and change the data format to duration. 0.0 will change to 0d, and your SUM formula will work.
The better way would be to replace these values with a null string. This would be done by adding an IF formula to each cell in the column. Assuming your duration column is Z, your current formula is presumably:
Z=Y-X
Change this to:
Z=IF(Y=“”,””,Y-X)
This will check to see if there is data in the “ending time” column and will only perform the subtraction if there is. Otherwise, the cell will appear empty. The actual contents will be a null string, represented as an empty set of quotation marks. These null strings will not interfere when you sum the column with SUM.
Sum of durations