+ Reply to Thread
Results 1 to 13 of 13

How to Write an IF Statement with Three Outcomes

  1. #1
    Registered User
    Join Date
    05-24-2020
    Location
    greece
    MS-Off Ver
    2010
    Posts
    76

    How to Write an IF Statement with Three Outcomes

    hi guys, i need a a formula at B1 which states that:if Ai is a number bigger than 1 show zero but if A1 is 0 show 1.thanks so much
    Last edited by AliGW; 11-26-2020 at 10:35 AM.

  2. #2
    Registered User
    Join Date
    05-24-2020
    Location
    greece
    MS-Off Ver
    2010
    Posts
    76

    Re: if statement 0,1

    i want to mention an aditional thing, if A1 is empty show empty at B1

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,755

    Re: if statement 0,1

    Administrative Note:

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, with more detail.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  4. #4
    Registered User
    Join Date
    05-24-2020
    Location
    greece
    MS-Off Ver
    2010
    Posts
    76

    Re: if statement 0,1

    hi dear Ali,you help me so much at the best,i dont forget it!
    so , ineed aformula at B1 which says that :if at A1 there is a number bigger than 1 to show 0(zero) and if A1 is zero to show 1 but if A1 is empty to show empty(i mean B1 to be embty)

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,755

    Re: if statement 0,1

    You have not updated your title as requested. Please do so.

  6. #6
    Registered User
    Join Date
    05-24-2020
    Location
    greece
    MS-Off Ver
    2010
    Posts
    76

    Re: if statement 0,1

    how can i change it?

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,755

    Re: if statement 0,1

    Follow the instructions in post #3, perhaps?

  8. #8
    Registered User
    Join Date
    05-24-2020
    Location
    greece
    MS-Off Ver
    2010
    Posts
    76

    If is a number 0,1

    so , ineed aformula at B1 which says that :if at A1 there is a number bigger than 1 to show 0(zero) and if A1 is zero to show 1 but if A1 is empty to show empty(i mean B1 to be embty)
    i try but is not good:=IF(A1>=1,0,1,"") or IF(A1>=1,0,1,)"")
    Last edited by zzz444; 11-26-2020 at 10:36 AM.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,755

    Re: How to Write an IF Statement with Three Outcomes

    No, sorry - the new title is just as bad as the old one and you have updated the wrong post, anyway. As we are getting nowhere fast, I have done it for you today, but will not help again in future: you must use detailed and explicit thread titles in future.

  10. #10
    Registered User
    Join Date
    05-24-2020
    Location
    greece
    MS-Off Ver
    2010
    Posts
    76

    Re: How to Write an IF Statement with Three Outcomes

    ok Ali ,you are always so kind!

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,755

    Re: How to Write an IF Statement with Three Outcomes

    Try this:

    =IF(A1="","",IF(A1=0,1,0))

  12. #12
    Registered User
    Join Date
    05-24-2020
    Location
    greece
    MS-Off Ver
    2010
    Posts
    76

    Re: How to Write an IF Statement with Three Outcomes

    exactly,super. i love you

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,755

    Re: How to Write an IF Statement with Three Outcomes

    LOL!

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] IF Statement with Multi-Criteria Statement inside a Data Validation List
    By dharvey1978 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-31-2020, 09:10 PM
  2. [SOLVED] If statement to select data - nested statement - assistance
    By petitesouris in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-29-2015, 09:55 PM
  3. compile error expected line number statement end statement
    By mattress58 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-18-2014, 10:12 AM
  4. VBA Compile Error : line number or label or statement or end of statement
    By excellearner121 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-04-2013, 06:41 PM
  5. Replies: 4
    Last Post: 06-01-2012, 10:05 AM
  6. Replies: 4
    Last Post: 05-16-2012, 05:33 PM
  7. [SOLVED] Utilize a Select Case Statement in Target Intersect Statement
    By max57 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-29-2009, 08:55 PM

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