+ Reply to Thread
Results 1 to 10 of 10

Merging 2 or more if functions together to try and get 3 different outcomes.

  1. #1
    Registered User
    Join Date
    10-26-2020
    Location
    London
    MS-Off Ver
    Microsoft Office 365
    Posts
    3

    Merging 2 or more if functions together to try and get 3 different outcomes.

    Hi, Hope you are all great!

    Would someone be able to help me with the below. I have 2 formulas that work separately however want to merge them into one formula.

    =IF(OR(AND(SUM(W3:X3)>=100,Y3>=0), AND(SUM(W3:X3)<=100, Y3<=0)), "Yes", "No")

    =IF(W3="","N/A", IF( X3= "", "N/A", IF(Y3="", "N/A")))

    I would like to add into the first formula that if W3 or X3 or Y3 are blank, then it should return "N/A"
    Last edited by ariaqb; 10-26-2020 at 06:24 AM.

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

    Re: Merging 2 or more if functions together to try and get 3 different outcomes.

    Welcome to the forum.

    Try this:

    =IF(OR(W3="",X3="",Y3=""),"N/A",IF(OR(AND(SUM(W3:X3)>=100,Y3>=0), AND(SUM(W3:X3)<=100, Y3<=0)), "Yes", "No"))
    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 José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Merging 2 or more if functions together to try and get 3 different outcomes.

    You can try
    =If(OR(W3="",X3="",Y3=""),"N/A",IF(OR(AND(SUM(W3:X3)>=100,Y3>=0), AND(SUM(W3:X3)<=100, Y3<=0)), "Yes", "No"))

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,366

    Re: Merging 2 or more if functions together to try and get 3 different outcomes.

    Try
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,366

    Re: Merging 2 or more if functions together to try and get 3 different outcomes.

    Think we have a consensus here

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

    Re: Merging 2 or more if functions together to try and get 3 different outcomes.

    Yup!

  7. #7
    Registered User
    Join Date
    10-26-2020
    Location
    London
    MS-Off Ver
    Microsoft Office 365
    Posts
    3

    Re: Merging 2 or more if functions together to try and get 3 different outcomes.

    Thank you all for your help!

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,366

    Re: Merging 2 or more if functions together to try and get 3 different outcomes.

    @Ali: quite amused by the time stamps on the thread

  9. #9
    Registered User
    Join Date
    10-26-2020
    Location
    London
    MS-Off Ver
    Microsoft Office 365
    Posts
    3

    Re: Merging 2 or more if functions together to try and get 3 different outcomes.

    Would you also help me to try and add another outcome please.

    So my current formula is =IF(OR(W3="",X3="",Y3=""),"N/A",IF(OR(AND(SUM(W3:X3)>100,Y3>0), AND(SUM(W3:X3)<100, Y3<0)), "Yes", "No"))

    Would it be possible to add =IF(AND(SUM(W3:X3)=100,Y3=0), "Yes", "No") into the first equation.

    Essentially if W3+X3 is 100 then Y3 should be 0 and vice versa.

    Thank you!

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,366

    Re: Merging 2 or more if functions together to try and get 3 different outcomes.

    Really think you should give it a go or you'll never get the hang of it.

    The part we added at the beginning was to avoid any of the cells being zero. Looks like you should be adding the new bit to the back end. You might need to look at using OR given that you want to end up with Yes or No for variations on a theme.

    These nested formulae are like anything complex, you need to plan them.

+ 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. Replies: 1
    Last Post: 11-02-2017, 09:20 PM
  2. Merging a number of If Functions into one?
    By ConfusedaboutVBA in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-22-2013, 05:32 PM
  3. Multiple logical functions resulting in multiple outcomes
    By PaddyG in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-13-2012, 12:20 PM
  4. Replies: 4
    Last Post: 09-03-2012, 06:27 AM
  5. Merging: displaying which sheet data comes from when merging sheets
    By zed commander in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-12-2012, 12:20 PM
  6. Merging Sumproduct and Frequency Formulas/Functions
    By mrgreek in forum Excel General
    Replies: 4
    Last Post: 06-22-2012, 01:26 PM
  7. Merging cells/merging cell content.
    By rhintintin in forum Excel General
    Replies: 3
    Last Post: 09-23-2010, 10:42 AM

Tags for this Thread

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