+ Reply to Thread
Results 1 to 3 of 3

Error message with formula IF

  1. #1
    Registered User
    Join Date
    09-24-2012
    Location
    Cairo, Egypt
    MS-Off Ver
    Excel 2007
    Posts
    1

    Error message with formula IF

    Dear all,

    Kindly help me with the below issue.

    When i try to use the following formula, always receive the error "the specified formula cannot be entered because it uses more levels of nesting than are allowed"

    The formula is:

    IF(LEFT(E9,1) = "1", "Spain", IF(LEFT(E9,1) = "2", "Spain", IF(LEFT(E9,1) = "3", "Spain", IF(LEFT(E9,1) = "4", "Spain", IF(LEFT(E9,1) = "5", "Spain", IF(LEFT(E9,1) = "6", "Spain", IF(LEFT(E9,1) = "7", "Spain", IF(LEFT(E9,1) = "8", "Spain", IF(LEFT(E9,1) = "9", "Spain", IF(LEFT(E9,1) = "2", "Spain"))))))))))

    Thanks,
    Ibrahim

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Error message with formula IF

    Your profile shows 2007, but that error message would indicate 2003. 2007+ does not have the limit of 7 nested IFs.

    I guess the big question, what are you trying to do?
    HTH
    Regards, Jeff

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Error message with formula IF

    Hi and welcome to the forum

    Im not sure what you are trying to do, but your formula can be simplified to this...

    =IF(and(value(LEFT(E9,1))>0,value(LEFT(E9,1))<10),"Spain","")
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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