Forum Discussion

Rnajar's avatar
Rnajar
Copper Contributor
Apr 07, 2021
Solved

Nested IF with a number of days

I am trying to have cells in one column turn a color with a message when the date is within the below parameters (I just need help with the formula, not the colors). I know I am missing a piece of the formula, but cannot figure out how to nest it.

 

If the publication date (column G) is:

 

  • Between 0 and 304 days, show In Compliance (I was able to do this)
  • Between 305 and 365 days, show Warning! (this is what I can’t figure out)
  • More than 365 days, show Review Required (I was able to do this)
  • If it is a new document that hasn’t yet been published, show TBD (I was able to do this)
  • Try this:
    =IF(G6="TBD","TBD",LOOKUP(TODAY()-G6,{0,305,366},{"In Compliance","Warning","Review Required"}))

6 Replies

  • JMB17's avatar
    JMB17
    Bronze Contributor
    Try this:
    =IF(G6="TBD","TBD",LOOKUP(TODAY()-G6,{0,305,366},{"In Compliance","Warning","Review Required"}))
      • JMB17's avatar
        JMB17
        Bronze Contributor
        I just caught it myself before posting.
  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Platinum Contributor

    Rnajar Try it this way:

    =LOOKUP(DAYS360(G6,TODAY()),{0,305,366},{"In Compliance","Warning","Review Required"})

     

Resources