+ Reply to Thread
Results 1 to 5 of 5

Combining IF Statements

  1. #1
    Registered User
    Join Date
    03-19-2007
    Posts
    35

    Combining IF Statements

    I need to combine 8 IF statements. Here are the IF statements in their order of precedence:

    =IF(OR(B3=$V$1,B3=$W$1,B3=$W$2),L3,0)

    =IF(K3="BX",0,L3)

    =IF(ISNUMBER(SEARCH("concession",H3)),0,L3)

    =IF(OR(G3={350,3100,3200,3300,3400,3423,3600,3700,3800,4800,9002,9701,9702,9706,9708,9709,9711,12262,12301,12345,25485,35110,35111,35112,35120,35170,35180,35775,42498,55882,61740,61750,61790,99019,99041,100526,101264,101426}),0,L3)

    =IF(ISNUMBER(SEARCH("6/24",I3)),L3/2,L3)

    =IF(ISNUMBER(SEARCH("8/24",I3)),(L3/3)*2,L3)

    =IF(ISNUMBER(SEARCH("4/36",I3)),L3/2,L3)

    =IF(I3=48,(48*L3)/288,L3)


    Any suggestions on how to combine them into one cell?

  2. #2
    Registered User
    Join Date
    08-12-2005
    Posts
    33
    Quote Originally Posted by Gambinus
    I need to combine 8 IF statements. Here are the IF statements in their order of precedence:

    =IF(OR(B3=$V$1,B3=$W$1,B3=$W$2),L3,0)

    =IF(K3="BX",0,L3)

    =IF(ISNUMBER(SEARCH("concession",H3)),0,L3)

    =IF(OR(G3={350,3100,3200,3300,3400,3423,3600,3700,3800,4800,9002,9701,9702,9706,9708,9709,9711,12262,12301,12345,25485,35110,35111,35112,35120,35170,35180,35775,42498,55882,61740,61750,61790,99019,99041,100526,101264,101426}),0,L3)

    =IF(ISNUMBER(SEARCH("6/24",I3)),L3/2,L3)

    =IF(ISNUMBER(SEARCH("8/24",I3)),(L3/3)*2,L3)

    =IF(ISNUMBER(SEARCH("4/36",I3)),L3/2,L3)

    =IF(I3=48,(48*L3)/288,L3)


    Any suggestions on how to combine them into one cell?
    I'll give you two methods:

    1. =CONCATENATE(IF(.........),IF(.........),IF(......),...so on.

    2. Put in your formulas between every If the sign &.

    Like this:

    =IF(........)&IF(.........)&IF(........) &.....so on.
    Last edited by sgm020; 03-21-2007 at 11:17 AM.

  3. #3
    Registered User
    Join Date
    03-19-2007
    Posts
    35
    The second method worked but it repeated the number. The answer should be 50, but is shows 5050

    Any suggestions?

  4. #4
    Registered User
    Join Date
    08-12-2005
    Posts
    33
    Quote Originally Posted by Gambinus
    The second method worked but it repeated the number. The answer should be 50, but is shows 5050

    Any suggestions?
    I did not control your formulas. I gave you two methods about 7 or more nested If .

    You should control your formulas.

    May be yours two formulas give the same result.
    Last edited by sgm020; 03-21-2007 at 04:18 PM.

  5. #5
    Registered User
    Join Date
    03-19-2007
    Posts
    35

    Thumbs up

    OK thanks. I figured out why it was repeating. Thanks for all your help.

+ 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