+ Reply to Thread
Results 1 to 6 of 6

Multiple IF statements

  1. #1
    Registered User
    Join Date
    07-30-2008
    Location
    UK
    Posts
    9

    Question Multiple IF statements

    Excel help.JPG

    Hello,

    Hopefully my image has attached properly, I'm struggling to get the display in the format that I need it in. I need the & or and in the middle.

    I've been trying for ages and I have gotten myself confused (hence I am here)

    Basically I need:
    If A2 is blank, then leave it blank, if not display A2....and....IF B2 is blank, then leave it blank if not display A2...(but I need to take into consideration the scenario that A or B are blank and therefore I don't need the & symbol.

    If there a "simple" way to get this?

    Thank you in advance

  2. #2
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,483

    Re: Multiple IF statements

    Try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    08-28-2012
    Location
    Lahore, Pakistan
    MS-Off Ver
    Excel 2013
    Posts
    11

    Re: Multiple IF statements

    Hi,
    Try this formula,
    =IF(AND(D1>0,E1>0),D1&" & "&E1,IF(AND(D1>0,E1=0),D1,IF(AND(D1=0,E1>0),E1,"")))

    Best wishes,
    Javaid

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

    Re: Multiple IF statements

    maybe... =IF(AND(A2="",B2=""),"",IF(AND(A2<>"",B2<>""),A2&" & "&B2,IF(A2<>"",A2,B2)))
    and change , to ; if your settings require it.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  5. #5
    Registered User
    Join Date
    07-30-2008
    Location
    UK
    Posts
    9

    Re: Multiple IF statements

    Thank you all for your help. I have the solution now.

    Thank you

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,215

    Re: Multiple IF statements

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

+ 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] Multiple If statements with multiple then statements pulling from Index/Match commands
    By Reggie Wells in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-30-2017, 03:25 PM
  2. [SOLVED] Nested if statements containing multiple and statements
    By John M. in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-22-2014, 11:48 PM
  3. Formula with multiple IF statements and IF AND statements
    By lottidotti in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-14-2013, 08:03 AM
  4. Replies: 3
    Last Post: 07-25-2013, 08:25 AM
  5. [SOLVED] Syntax for formula that uses multiple conditions inside of multiple IF statements
    By njmiller31 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-02-2013, 11:55 AM
  6. Multiple nested IF statements and AND statements
    By TonyGetz in forum Excel General
    Replies: 2
    Last Post: 12-14-2010, 03:07 AM
  7. Replies: 12
    Last Post: 05-15-2009, 08:38 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