IF/AND formula

I need to calculate the number of Network Days based on a Leave Status but if a half day has been checked, it needs to just put 0.5. The formula I am currently using is:


=IF(AND([Half Day]@row = 1) [Leave Type]@row = "TOIL", "0.5", NETWORKDAYS([Start Date]@row, [End Date]@row))

But I'm getting a #Unparsable error.


What am I doing wrong?

TIA

Cheryl

Tags:

Best Answers

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    Answer ✓

    The AND piece is just a little off.

    =IF(AND([Half Day]@row = 1, [Leave Type]@row = "TOIL"), "0.5", NETWORKDAYS([Start Date]@row, [End Date]@row))

    Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!

    CERTIFIED SMARTSHEET PLATINUM PARTNER

    10xViz.com

  • =Chris Palmer
    =Chris Palmer ✭✭✭✭✭
    Answer ✓

    Hi Cheryl,

    Looks like you need some commas and one more parenthesis to initiate the IF AND

    Give this a shot and see if it works for you:

    =IF(AND([Half Day]@row = 1, [Leave Type]@row = "TOIL"), 0.5, NETWORKDAYS([Start Date]@row, [End Date]@row))

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!