+ Reply to Thread
Results 1 to 16 of 16

Unknown error, possible formula too long.

  1. #1
    Registered User
    Join Date
    12-09-2011
    Location
    Latvia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Thumbs up Unknown error, possible formula too long.

    Hello everyone. I have this problem with EXCEL 2003: i enter this formula =if(D2>=275;10;if(D2>=265;9;if(D2>=255;8;if(D2>=250;7;if(D2>=245;6;if(D2>=235;5;if(D2>=230;4;if(D2>=220;3;if(D2>=215;2;if(D2>=200;1;0)))))))))) and it gives me an error. When i shorten this formula it works perfect. I know that excel allows 1024 characters long formulas, my formula is not that long, how do you think where could be a problem in this formula? I tried other formulas about same size and same error shows up.
    Last edited by Saidrex; 12-10-2011 at 11:25 AM.

  2. #2
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Unknown error, possible formula too long.

    Give this a try:

    Please Login or Register  to view this content.
    Cheers,
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  3. #3
    Registered User
    Join Date
    12-09-2011
    Location
    Latvia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Unknown error, possible formula too long.

    thank you, i'll try it tomorrow

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Unknown error, possible formula too long.

    The restriction you are coming up against is the maximum number of nested functions in Excel 2003 (7) not the formula length, MATCH would also work.....

    =MATCH(D2;{0,200,215,220,230,235,245,250,255,265,275})-1
    Audere est facere

  5. #5
    Registered User
    Join Date
    12-09-2011
    Location
    Latvia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Unknown error, possible formula too long.

    Tried both formulas and they both work great.

    ConneXionLost, daddylonglegs, Thank you very much

  6. #6
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Unknown error, possible formula too long.

    And you don't have to hard-code the values in the two solutions provided.
    Enter the values between brackets in a range ( or ranges) and place the range in the formula.
    If you need to change later, things are easier

  7. #7
    Registered User
    Join Date
    12-09-2011
    Location
    Latvia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Unknown error, possible formula too long.

    I have problem with MATCH formula. It doesn't work how i need when i put in these numbers MATCH(E2;{0;21,5;21,0;20,5;20,0;19,5;19,0;18,5;18,0;17,5;17,0})-1

    Points Result
    1 21,5
    2 21,0
    3 20,5
    4 20,0
    5 19,5
    6 19,0
    7 18,5
    8 18,0
    9 17,5
    10 17,0

    I need it to count points by result. For example, result 20,7 gets 2 points, result 16,9 gets 10 points, result 17,3 gets 9 points.

  8. #8
    Registered User
    Join Date
    12-09-2011
    Location
    Latvia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Unknown error, possible formula too long.

    Sorry, nevermind, fixed it with LOOKUP formula:
    =LOOKUP(E2;{0;17,1;17,6;18,1;18,6;19,1;19,6;20,1;20,6;21,1;21,5};{10;9;8;7;6;5;4;3;2;1;0})

  9. #9
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Unknown error, possible formula too long.

    If your list are in descending order, you need to use -1 in match_type. use like this,

    =MATCH(E1;{9E300;21;20,5;20;19,5;19;18,5;18;17,5;17},-1)

    9E300 means a big number. So any value >21 will show 10
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  10. #10
    Registered User
    Join Date
    12-09-2011
    Location
    Latvia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Unknown error, possible formula too long.

    wow. It works even better than my solution. Thank you. Only one little flaw, i need it to show numbers >21,5 to show 0.

  11. #11
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Unknown error, possible formula too long.

    Try this,

    =MATCH(E2;{9E300;21;20,5;20;19,5;19;18,5;18;17,5;17};-1)-(E2>=21,5)

  12. #12
    Registered User
    Join Date
    12-09-2011
    Location
    Latvia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Unknown error, possible formula too long.

    sorry, my mistake, i need numbers >21,5 to show 0,5

  13. #13
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Unknown error, possible formula too long.

    use this,

    =MATCH(E2;{9E300;21;20,5;20;19,5;19;18,5;18;17,5;17};-1)-((E2>21,5)/2)

  14. #14
    Registered User
    Join Date
    12-09-2011
    Location
    Latvia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Unknown error, possible formula too long.

    yes, thank you, works great, thanks a lot, really, im in your debt

  15. #15
    Registered User
    Join Date
    12-09-2011
    Location
    Latvia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Unknown error, possible formula too long.

    and problem again =) now i noticed that this formula - =MATCH(E2;{9E300;21;20,5;20;19,5;19;18,5;18;17,5;17};-1)-((E2>21,5)/2) counts empty cells as 10, but i need it to count them as 0 and 0 as 10

  16. #16
    Registered User
    Join Date
    12-09-2011
    Location
    Latvia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Unknown error, possible formula too long.

    sorry, nevermind fixed this myself - =IF(ISBLANK(E7);0;MATCH(E2;{9E+300;23,5;23;22;21;20;20,5;19,5;18,5;17,5};-1)-((E2>24)/2))

+ 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