Nested If Statements

I'm trying to check a box to indicate whether a remediation item has been opened or closed in the past year.

 

My relevant fields are report date, target date, and date closed. Date Closed could potentially be blank.

 

Here is the formula I've been trying to refine: =IF(OR(TODAY() - [Report Date]77 < 365, TODAY() - [Last Remed Target Date]77 < 365), IF(NOT(ISBLANK([Date Closed]77)), IF(TODAY() - [Date Closed]77 < 365, 1, 0, 0, 0)))

 

I'm sure my brackets are incorrect at this point. Can someone please help me correct this?

Tags:

Comments

  • ricki
    ricki ✭✭✭✭✭✭

    I think your issue may be with

    IF(TODAY() - [Date Closed]77 < 365, 1, 0, 0, 0)

     

    The if should have 3 parameters

    condition, if true, if fals

    You have 5 parameters in that if .... i guess some of those 0s belong with the other ifs

    maybe you meant

    =IF(OR(TODAY() - [Report Date]77 < 365, TODAY() - [Last Remed Target Date]77 < 365), IF(NOT(ISBLANK([Date Closed]77)), IF(TODAY() - [Date Closed]77 < 365, 1, 0), 0), 0)

     

  • I definitely know the three 0's at the end are wrong. I had tried several variations with the aid of a coworker and finally just decided to waive the white flag.

    I've tried what you've proposed above and still get "#Invalid Operation".

  • ricki
    ricki ✭✭✭✭✭✭

    Maybe there is something with one of your field names then? I tried the following in a test sheet that i have and i did not get an error

     

    =IF(OR(TODAY() - TestDate1 < 365, TODAY() - TestDate2 < 365), IF(NOT(ISBLANK(TestDate3)), IF(TODAY() - TestDate4 < 365, 1, 0), 0), 0)

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!