Forum Discussion

titodona's avatar
titodona
Copper Contributor
Jul 15, 2020
Solved

Formula help

Hi,   I am trying to figure out a formula to not count certain values if there's 0 in a cell   Basically if c3<0 then don't add the values from D3-D5-D8-D9    Makes sense? help????
  • OwenPrice's avatar
    OwenPrice
    Jul 15, 2020

    titodona 

     

    Ok, I understand now.

     

    If you check the sum of hours worked for bussers and runners respectively, and only subtract when there are some hours worked by at least one busser or runner, then again only subtract from that when there are at least some hours worked by a bartender, you'll get what you need.

    So, for cell H2 for Kristi, for example, you could use this:

    =G2-IF(SUM($L$2:$L$3)>0,$N$2,0)-IF(SUM($L$6:$L$7)>0,$N$6,0)

    That is to say, subtract from the total tips earned, the amount for the bussers only if bussers hours were greater than zero, and the amount for the runners only if the runners hours were greater than zero.

     

    This amount is then what you calculate the bartender's tips from (which you already have in cells N10:P10).

     

    Then finally, the amount left for the server is column H minus the bartender's tips but only if there were bartender hours worked. So this formula goes in B10:

    =H2-IF(SUM($L$10:$L$11)>0,$N$10,0)

     

    I edited a copy of your workbook on the sheet "New". See attached.

Resources