Forum Discussion
Erika Smith
Jan 10, 2017Copper Contributor
Formula help please
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).
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
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
- Erika SmithCopper ContributorNevermind! I figured out a way that it works with those exact formulas! THANK YOU SO MUCH! You saved me from utter craziness.
- Erika SmithCopper Contributor
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...
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
- Erika, I didn't catch your calculations (Mon to Fri 10 hrs each gives 50 hrs), however you may use SUMIF instead of SUM
- Erika SmithCopper ContributorNo, don't work on Wednesday, thus the "0" entered\