SOLVED

Formula help please

Copper Contributor

I am trying to write a formula that adds time together or an employee sheet, but I would like it to reset whenever a "0" is input. For Example: Adding Monday through Friday, each employee working 10 hours a day, would give me 40 hours, but if I insert a "0" on Wednesday I want my formula to return 20 because the amount of time is resetting. (I hope that makes sense).

6 Replies
Erika, I didn't catch your calculations (Mon to Fri 10 hrs each gives 50 hrs), however you may use SUMIF instead of SUM
No, don't work on Wednesday, thus the "0" entered\
best response confirmed by Erika Smith (Copper Contributor)
Solution

Hi Erika

 

That's a tricky one.  I've attached a file for you to look at.

 

I've split it into 2 formulas

 

The first formula finds where in the row of numbers the first 0 appears

 

The second formula then adds up the numbers from that point

 

Summing from a point.PNG

I wrote the formulas just as you showed and at first it worked when I only had one zero within the week... is there any way that it can be written to provide the answer if there are multiple zeros within the week? Attached is the worksheet I have been attempting to put the formula on...

Nevermind! I figured out a way that it works with those exact formulas! THANK YOU SO MUCH! You saved me from utter craziness.

I've added a couple of formula options you could use to replace the original MATCH formula

 

They both need you to add a row at the top to "lookup" the starting point

 

Finding Last Occurence.PNG

1 best response

Accepted Solutions
best response confirmed by Erika Smith (Copper Contributor)
Solution

Hi Erika

 

That's a tricky one.  I've attached a file for you to look at.

 

I've split it into 2 formulas

 

The first formula finds where in the row of numbers the first 0 appears

 

The second formula then adds up the numbers from that point

 

Summing from a point.PNG

View solution in original post