+ Reply to Thread
Results 1 to 9 of 9

nesting functions within functions

  1. #1
    Registered User
    Join Date
    03-30-2007
    Posts
    12

    nesting functions within functions

    the excel help function says i can nest no more than seven functions within a function. is there a way around this?
    thanks

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,699
    There are ways round that limitation but normally there's a more efficient way too - e.g. if you're looking to nest 7 IFs you'll often be better off with some sort of LOOKUP function.

    If you can describe in a little more detail what you want to do then it'll be easier to give a more specific answer.....

  3. #3
    Registered User
    Join Date
    03-30-2007
    Posts
    12
    This is what I need to do.
    I work at a golf course, and we have a chart to convert a person's handicap index to their course handicap.
    For example,
    0 thru 0.4 -> 0
    0.5 thru 1.3 -> 1
    1.4 thru 2.1 -> 2
    2.2 thru 3.0 -> 3
    The chart carries on through 42 handicap
    I want to enter an index (ex. 0.7) in one column, and have the function in an adjacent column give me the course handicap (ex. 1)

    The function I was using looks like this
    =IF(A1="","",IF(A1<=0.4,0,IF(AND(A1>0.4,A1<=1.3),1)

    Thanks for any help

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    This kind of construct might help

    =CHOOSE(MATCH(a1,{0,.5,1.4,2.1,3.1,,,}),0,1,2,3,...)

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,699
    I'd suggest a simple LOOKUP formula.

    If you create a table with the lower bound of each range in one column and the relevant course handicap in another you can use a very simple formula.

    This setup allows you to easily change the table any time you want without having to change any formulas.

    See attached example. Obviously you need to make the table larger and then alter the formula to reference the whole table
    Attached Files Attached Files

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,699
    ...sorry, I should have use some $ signs in my suggested formula to stop the table range changing when formula is copied down the page.

    Formula in E2 should be

    =LOOKUP(D2,A$2:B$9)

    which can be copied down the column

  7. #7
    Registered User
    Join Date
    03-30-2007
    Posts
    12
    Thank you so much. That lookup function is exactly what I needed.

  8. #8
    Registered User
    Join Date
    03-30-2007
    Posts
    12
    what are the $'s for?

  9. #9
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,699
    It just ensures that when the formula is "dragged down" the reference to the table doesn't change. You don't need them if you only want the formula in a single cell

+ 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