Forum Discussion

Erika Smith's avatar
Erika Smith
Copper Contributor
Jan 10, 2017
Solved

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 Smith's avatar
      Erika Smith
      Copper Contributor
      Nevermind! I figured out a way that it works with those exact formulas! THANK YOU SO MUCH! You saved me from utter craziness.
    • Erika Smith's avatar
      Erika Smith
      Copper 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...

  • 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 Smith's avatar
      Erika Smith
      Copper Contributor
      No, don't work on Wednesday, thus the "0" entered\

Resources