+ Reply to Thread
Results 1 to 5 of 5

Need Help on Multiple IF Statement

  1. #1
    Registered User
    Join Date
    12-20-2011
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    40

    Need Help on Multiple IF Statement

    can anyone tell me what's wrong with this formula? It doesnt work.



    =IF(MID(D2,10,1)="-",1,IF(MID(F2,10,1)="-",2,IF(MID(H2,10,1)="-",3,IF(MID(I2,10,1)="-",4,IF(MID(J2,10,1)="-",5,IF(MID(L2,10,1)="-",6,IF(MID(BR2,10,1)="-",7,IF(MID(BS2,10,1)="-",8,IF(MID(BJ2,10,1)="-",9,IF(MID(BW2,10,1)="-",10,IF(MID(BY2,10,1)="-",11,IF(MID(CB2,10,1)="-",12,IF(MID(CF2,10,1)="-",13,IF(MID(CY2,10,1)="-",14,IF(MID(DA2,10,1)="-",15,IF(MID(DB2,10,1)="-",16,"No Match"))))))))))))))))

  2. #2
    Forum Expert GeneralDisarray's Avatar
    Join Date
    09-15-2011
    Location
    Pittsburgh, PA, USA
    MS-Off Ver
    Windows Excel 2016
    Posts
    1,416

    Re: Need Help on Multiple IF Statement

    If you are needing to nest this many together, then you should consider another option. Can you upload an example of what you are trying to do?

    Which version of excel are you using?

    edit:

    reference for maximum number of IF statements:

    http://www.mrexcel.com/forum/excel-q...s-allowed.html


    Some ideas to avoid nested if statements:

    http://www.excelhero.com/blog/2010/01/i-heart-if.html
    Last edited by GeneralDisarray; 06-19-2013 at 10:00 AM.
    Remember, saying thanks only takes a second or two. Click the star icon(*) below the post you liked, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.

  3. #3
    Registered User
    Join Date
    12-20-2011
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    40

    Re: Need Help on Multiple IF Statement

    excel 2010. I attached a sample file. the formula is in cell B2
    Attached Files Attached Files

  4. #4
    Forum Expert GeneralDisarray's Avatar
    Join Date
    09-15-2011
    Location
    Pittsburgh, PA, USA
    MS-Off Ver
    Windows Excel 2016
    Posts
    1,416

    Re: Need Help on Multiple IF Statement

    Ok, this is what you sent.

    When i opened it, cell B2 was showing the formula instead of the result, because there was a space in front of the "=" sign. But after i removed that, it seems to work.

    I removed values from cells (D2, F2, etc..) and the result in B2 changed as it appears you meant it to.

    Does the sheet i attached work?
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    12-20-2011
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    40

    Re: Need Help on Multiple IF Statement

    thanks for your help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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