+ Reply to Thread
Results 1 to 7 of 7

IF OR test? two conditions, two outcomes

Hybrid View

  1. #1
    Registered User
    Join Date
    04-29-2013
    Location
    London
    MS-Off Ver
    Excel MAC 2011
    Posts
    16

    Angry IF OR test? two conditions, two outcomes

    Hi,

    I'm trying to figure out how to do:

    =IF(Table1[@Date]=TODAY(),"TODAY","")

    =IF(Table1[@Date]=TODAY()-1,"YESTERDAY","")

    in one cell. Can anyone help?

    Much appreciated

    H

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,416

    Re: IF OR test? two conditions, two outcomes

    Try this:

    =IF(Table1[@Date]=TODAY(),"TODAY",IF(Table1[@Date]=TODAY()-1,"YESTERDAY",""))

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    04-29-2013
    Location
    London
    MS-Off Ver
    Excel MAC 2011
    Posts
    16

    Re: IF OR test? two conditions, two outcomes

    Golly, thank you very much. I think the penny has just dropped on the logic to IF.

    essentially, if(condition1true, value1, if(condition2true, value2), if(condition3true, value3, ""))) Would that be correct?

    Excellent forum. Forgive me, all, if I pester you. Crash-coursing excel.

    Honeyfoot

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,612

    Re: IF OR test? two conditions, two outcomes

    The parenthesis after your second "If" and the last parenthesis are not necessary, but you have the overall idea
    if(condition1true, value1, if(condition2true, value2, if(condition3true, value3, ""))

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,416

    Re: IF OR test? two conditions, two outcomes

    You need 3 closing brackets at the end.

    Hope this helps.

    Pete

  6. #6
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,612

    Re: IF OR test? two conditions, two outcomes

    THis one only has 2 and it works ?? =IF(A1="x","x",IF(A1="y","y","z"))

  7. #7
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,416

    Re: IF OR test? two conditions, two outcomes

    Yes, but in post #3, and in your reply to it, there are 3 IF functions.

    Pete

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1