+ Reply to Thread
Results 1 to 13 of 13

How to combine two IF(S) statements?

  1. #1
    Registered User
    Join Date
    05-04-2012
    Location
    UK
    MS-Off Ver
    Excel 2003 / Excel 2007 / Excel 2010
    Posts
    12

    How to combine two IF(S) statements?

    Greetings All, I have been trying to sort out for days and am missing something

    =IF(F10="Per Metre",(E10/3.2808399)*H5) This works great as expected.

    =IFS(F10="Each",E10/6)*H5 This works great as well.

    How do i combine the 2 together

    Any help would be great thanks

    Please make answers simple.
    Last edited by AliGW; 04-27-2022 at 05:23 AM. Reason: Title changed - please think more carefully about your thread titles in future!

  2. #2
    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,412

    Re: IF or IFS

    Like this, perhaps

    =IF(F10="Per Metre",(E10/3.2808399)*H5,(E10/6)*H5)

    Administrative Note:

    Your thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    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. As you have so few posts here, I have done it for you this time, but would urge you to read our rules!.)
    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.

  3. #3
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,903

    Re: How to combine two IF(S) statements?

    What if F10 is not either of those values?
    Rory

  4. #4
    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,412

    Re: How to combine two IF(S) statements?

    Then this:

    =IF(F10="Per Metre",(E10/3.2808399)*H5,IF(F10="Each",(E10/6)*H5,""))

    The "" can be replaced with anything the OP likes.

  5. #5
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,903

    Re: How to combine two IF(S) statements?

    Sorry, that was not aimed at you, but at the OP.

  6. #6
    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,412

    Re: How to combine two IF(S) statements?

    No, but you were right to ask and I've offered a solution.

  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,412

    Re: How to combine two IF(S) statements?

    This has been posted to my visitor message feed (should have been posted here):

    Greetings.
    Thanks for that, now i see it as there are only 2 choices i believe.
    would you be so kind as to ( for future reference ) explain if there were three choices.

    =IFS(F10="Per Metre",E10/3.2808399)*H5
    =IFS(F10="Each",E10/6)*H5
    =IFS(F10="Per Qube",E10/6)*H5
    Try this:

    =IF(F10="Per Metre",(E10/3.2808399)*H5,IF(F10="Each",(E10/6)*H5,IF(F10="Per Qube",(E10/6)*H5,"")))

  8. #8
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,903

    Re: How to combine two IF(S) statements?

    Given that only one factor appears to change, and still dependent on whether F10 might not contain any of the values in question, one could also use something like:

    =(E10/IF(F10="Per Metre",3.2808399,6))*H5

  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,412

    Re: How to combine two IF(S) statements?

    Yes, I agree completely, but I think the OP needs to understand the principle of nesting IF statements.

    I would have done it differently (in a similar way to you, Rory).

  10. #10
    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,412

    Re: How to combine two IF(S) statements?

    Alan - thanks for your PM. I have sent you a message explaining how to reply to this thread (by typing into the Quick Reply box below) - please do this now, and then I will explain (here) how to sign off the thread.
    Last edited by AliGW; 04-27-2022 at 06:05 AM.

  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,412

    Re: How to combine two IF(S) statements?

    I feel I must apologise on Alan's behalf for his not coming back and signing off. I have sent him the information he needs to post to this thread, but he has now left, so knowing that he feels the issue is resolved, I am going to mark this as solved for him.

    @Alan

    If you post here again, please follow my instructions and keep the converstaion within your thread. Don't use visitor messages and private messages instead. Thanks.

  12. #12
    Registered User
    Join Date
    05-04-2012
    Location
    UK
    MS-Off Ver
    Excel 2003 / Excel 2007 / Excel 2010
    Posts
    12

    Re: How to combine two IF(S) statements?

    Greetings All.

    Thanks to everyone for there input and solutions.
    Your answers have solved my problem and the formula is now returning the desired results.

    All you folks who contribute to various forums deserve better recognition for your free advice and guidance.

    Thanks again.

  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,412

    Re: How to combine two IF(S) statements?

    Thanks, Alan, and glad you managed to post here finally!!!

+ 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