Forum Discussion

NoraJJ's avatar
NoraJJ
Copper Contributor
Mar 01, 2021
Solved

Add IF layer to a established Lookup formula

This is my working formula for the spreadsheet:

Cell F2 =LOOKUP(DAYS360(B2,TODAY()),{-1000,3,7,30},{"Less than 3 days","Less than 7 days","Less than 30 days","Over 30 days"})

 

I need to add a layer to this formula:

In column D2 the cells have either "Yes" or "No" in them. If the cell has yes then the response in Cell F2 needs to say "complete". Only if cell D2 says "No" would I need the answers from my above lookup.

  • NoraJJ 

    You simply add IF in F2, like this:

    =IF(D2="Yes","Complete",
    LOOKUP(DAYS360(B2,TODAY()),{-1000,3,7,30},{"Less than 3 days","Less than 7 days","Less than 30 days","Over 30 days"}))

5 Replies

  • Twifoo's avatar
    Twifoo
    Silver Contributor

    NoraJJ 

    You simply add IF in F2, like this:

    =IF(D2="Yes","Complete",
    LOOKUP(DAYS360(B2,TODAY()),{-1000,3,7,30},{"Less than 3 days","Less than 7 days","Less than 30 days","Over 30 days"}))
    • NoraJJ's avatar
      NoraJJ
      Copper Contributor
      Thank you for helping me understand this.
  • mathetes's avatar
    mathetes
    Gold Contributor
    Try =IFS(D2="Yes","Complete",D2="No",LOOKUP(DAYS360(B2,TODAY()),{-1000,3,7,30},{"Less than 3 days","Less than 7 days","Less than 30 days","Over 30 days"}))

    Note that this is the IFS function, not IF'; so you could add other conditions for cell D2

    • NoraJJ's avatar
      NoraJJ
      Copper Contributor
      Thank you for your time and input.

Resources