Results 1 to 4 of 4

Thread: Problem with nested statements.
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Apr 2013
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Problem with nested statements.

    Hello,

    I wonder if some one can help me solve the folowing...

    I keep getting this error message "The specified formula connot be entered because it uses more levels of nesting than are allowed"



    =IF(AB5="","",IF((AB5=0),0,IF((AB5<=8000),0.28,IF((AB5<=9000),0.26,IF((AB5<=10000),0.255,IF((AB5<=11000),0.24,IF((AB5<=12000),0.2375,IF((AB5<=13000),0.235,IF((AB5<=14000),0.23,IF((AB5<=15000),0.2275,IF((AB5<=16000),0.225,IF((AB5<=17000),0.2225,IF((AB5<=18000),0.22,IF((AB5<=19000),0.2175,IF((AB5<=25000),0.215,IF((AB5<=30000),0.21,IF((AB5<=50000),0.205)))))))))))))))))


    It's basically a labor cost expected total based on sales.

    any advise would be appreciated.


    -Sam.

  2. #2
    MrExcel MVP Scott Huish's Avatar
    Join Date
    Mar 2004
    Location
    Oregon
    Posts
    19,815
    Post Thanks / Like
    Mentioned
    5 Post(s)
    Tagged
    4 Thread(s)

    Default Re: Problem with nested statements.

    Instead of nested IFs have a look at the VLOOKUP function.
    Office 2010/365

  3. #3
    Board Regular
    Join Date
    Aug 2011
    Posts
    2,932
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Problem with nested statements.

    Hi,

    Another alternative might be INDEX / MATCH with a match type of -1 (finding the smallest value that is greater than or equal to lookup value), like this:

    Code:
    =IF(
       AB5 = "", "",
       INDEX(
         {0.205;0.21;0.215;0.2175;0.22;0.2225;0.225;0.2275;0.23;0.235;0.2375;0.24;0.255;0.26;0.28;0},
         MATCH(
          AB5,
          {50000;30000;25000;19000;18000;17000;16000;15000;14000;13000;12000;11000;10000;9000;8000;0},
          -1))
      )
    You might want to move the hardcoded values to ranges on your worksheet or named ranges. For more on the MATCH function and INDEX/MATCH see:
    MS Excel: MATCH Function (WS)
    MATCH - Excel - Office.com
    Excel Index Function and Match Function
    Last edited by circledchicken; Apr 4th, 2013 at 06:50 PM.

  4. #4
    New Member
    Join Date
    Apr 2013
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Problem with nested statements.

    Quote Originally Posted by Scott Huish View Post
    Instead of nested IFs have a look at the VLOOKUP function.
    this solved my Problem!!!

    thanks a lot!!

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •