• 396K Members
• 3,970 Online
• 432K Conversations

total and subtotal time

Occasional Visitor

total and subtotal time

I have the need to calculate the accumulating time and then the subtotal when a value in another column changes. My example would be Column A is date/time; Column B contains one of the following "Start", "Update" and "Stop".  I need to sum the time if Column B is "Start" and "Update" and subtotal when it is "Stop" and then start the sum again on the next "Start".  Also if I get two "Start"s in a row flag the row of data and either continue the suming or give the user the choice to continue suming or force a subtotal or at least check to see if there was a missing "Stop".

2 Replies

Re: total and subtotal time

@jspry , for the model like this

cumulative time could be calculated as

`=IF((\$B2="Start")*NOT(   (COUNTIF(\$B1:B\$2,"Stop")<>COUNTIF(\$B1:B\$2,"Start"))*(COUNTIF(\$B1:B\$2,"Start")>1)*(\$B2="Start")  ),0,\$A2-N(\$A1)+N(\$C1))`

and Start without previous Stop highlighted with conditional formatting rule with formula

`=(COUNTIF(\$B1:B\$2,"Stop")<>COUNTIF(\$B1:B\$2,"Start"))*(COUNTIF(\$B1:B\$2,"Start")>1)*(\$B2="Start")`

applied to the column B

Re: total and subtotal time

Given that you used many or’s in your explanation, please attach your sample file with desired results so that the logic thereof could be deciphered.
Related Conversations
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
2 Replies
Early preview of Microsoft Edge group policies
Sean Lyndersay in Discussions on
65 Replies
*Updated 9/3* Syncing in Microsoft Edge Preview Channels
Elliot Kirk in Articles on
202 Replies