IF AND OR

Hi I am trying to create a formula which does the following:

IFS [day] = "sat or "sun", [over time] = [hours worked], [day]<>"sat"or"sun" AND [hours worked]>8,[hours worked]-8

can anyone help me with the right brackets and syntax? Basically if the site guys enter 8 hours on a sunday it should all be counted as over time, if they enter 9 hours on a Monday, one hour of that should count as over time. Hope I have explained my problem well enough


I got the if sat or sun formula to work using if(or)

=IF(OR(Day349 = "sat", Day349 = "sun"), [Total Daily Hours]349)


but when I added the next step I could not get it to work

My attempt is below:

=IF(AND(OR(Day349 = "sat", Day349 = "sun"), [Total Daily Hours]349), [Total Daily Hours]349 > 8, [Total Daily Hours]349 - 8)

all help much appreciated


thanks


Tom

Best Answer

Answers

  • hooray! thanks david, I had spent a while getting so close but not quite cracking it so thanks v much for your help, works perfectly now

  • David Tutwiler
    David Tutwiler Overachievers Alumni

    Awesome! Glad it is working.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!