+ Reply to Thread
Results 1 to 3 of 3

Looking for a sollution with If statements

  1. #1
    Registered User
    Join Date
    03-31-2010
    Location
    Las Vegas, NV
    MS-Off Ver
    Excel 2003
    Posts
    14

    Looking for a sollution with If statements

    Hello, I am trying to write a formula in Excel 2003. I have a nice nested IF statement that works fine:
    =IF((AND(A2>=0,A2<=250)),30,IF((AND(A2>=251,A2<=500)),37.5,IF((AND(A2>=500,A2<=750)),55,IF((AND(A2>=751,A2<=1000)),60,IF((AND(A2>=1001,A2<=1250)),82.5,IF((AND(A2>=1251,A2<=1500)),90,))))))
    the problem is I am hitting the cap on the number of statements I can have in a formula. I need to be able continue the function of the above formula for 25 seperate responses to the value of cell A2. What would my best course of action be on how to resolve this issue? Do any of you have examples on how to work around this?

    Thanks,

    Erik
    Last edited by ErikVegas; 03-31-2010 at 01:43 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Looking for a sollution with If statements

    Try something like

    =Lookup(A2,{0,251,501,751,1001,1251},{30,37.5,55,60,82.5,90})

    you can add more to each array...

    If you have quite a few, you probably should consider creating a table of values and using the LOOKUP() to refer to that table... e.g. =LOOKUP(A2,X1:Y100)
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    03-31-2010
    Location
    Las Vegas, NV
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Looking for a sollution with If statements

    WOW first answer right out of the box and it worked.....thanks for the 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