+ Reply to Thread
Results 1 to 7 of 7

Four IF statements to combine

  1. #1
    Forum Contributor ABSTRAKTUS's Avatar
    Join Date
    04-18-2010
    Location
    England
    MS-Off Ver
    Win10 Excel 2016
    Posts
    609

    Four IF statements to combine

    Hi all,

    Sat with since lunch and couldn't work out how to make formula working. I need to write IF statement with 4 criteria, or at least I think IF will do the trick. It would be difficult and not very visual to describe my question here, therefore I have attached a dummy workbook with the comments. Basically I have got 2 values in 2 columns. Next 2 columns will hold letter "x". There are 4 possible variations how "x" will appear in those two columns: first, second, both or none. So depending where the "x" is, I need to return one of the 2 values. Any ideas?

    Thanks guys!
    Attached Files Attached Files

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: Four IF statements to combine

    Will this do it for you?
    =IF(H8="x",F8,IF(I8="x",G8,IF(AND(I8="x",H8="x"),G8,IF(AND(I8="",H8=""),"A",""))))
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Contributor ABSTRAKTUS's Avatar
    Join Date
    04-18-2010
    Location
    England
    MS-Off Ver
    Win10 Excel 2016
    Posts
    609

    Re: Four IF statements to combine

    I think I got it going when combined IF with OR...

  4. #4
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: Four IF statements to combine

    had to adjust the formula to =IF(AND(H30="x",I30="x"),G30,IF(AND(H30="",I30=""),"A",IF(H30="x",F30,IF(I30="x",G30))))
    but it sounds like you are saying you solved it yourself. If so don't forget to mark the post as solved.

  5. #5
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Four IF statements to combine

    maybe this

    =IF(AND(H8="X",I8="X"),G8,IF(H8="X",F8,IF(I8="X",G8,"A")))
    Last edited by AlKey; 01-29-2014 at 03:32 PM.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Four IF statements to combine

    This should work for you:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  7. #7
    Registered User
    Join Date
    01-24-2014
    Location
    Ahmedabad
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Four IF statements to combine

    Dear Friend,

    Kindly used below Formula

    =IF(AND(H30="",I30=""),"A",IF(AND(H30<>"",I30<>""),G30,IF(AND(H30="",I30<>""),G30,IF(AND(H30<>"",I30=""),F30))))

    HEADACHE.xlsx

+ 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. Need to combine 20 IF statements
    By CatMac in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-06-2013, 04:58 AM
  2. Can I combine 3 IF statements into one?
    By Mike7591 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-24-2013, 11:58 AM
  3. combine several IF statements
    By inkansun in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-26-2010, 08:24 AM
  4. Combine 2 If statements
    By m1066189 in forum Excel General
    Replies: 2
    Last Post: 06-23-2010, 07:58 PM
  5. How to combine two IF statements together.
    By foad in forum Excel General
    Replies: 7
    Last Post: 03-13-2009, 05:06 AM

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