+ Reply to Thread
Results 1 to 6 of 6

function within a function

  1. #1
    Registered User
    Join Date
    05-16-2006
    Posts
    18

    function within a function

    hi

    my function is
    Please Login or Register  to view this content.
    . if i were to add a function in the false statement, it will only allow this 6 or 7 times. is there a way to get around this using functions?

    eg.
    Please Login or Register  to view this content.
    thanks

  2. #2
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094
    Jay

    You are only allowed 7 nested functions but if you post your data and what you want to do with it (your OP has the same IF over and over) it would be easier to help.


    Regards,

    Steve

  3. #3
    JMB
    Guest

    RE: function within a function

    I am assuming the data you want returned is in row 6 (beginning in column H),
    the dates are in row 4 (beginning in column H). As mentioned, your example
    simply repeats the same range references, which is not helpful.

    =INDEX(trends!H6:L6,MATCH(MONTH(TODAY()),MONTH(trends!H4:L4),0))

    must use Control+Shift+Enter after typing in the formula, change ranges as
    needed.


    "jay d" wrote:

    >
    > hi
    >
    > my function is
    > Code:
    > --------------------
    > =IF(MONTH(TODAY())=(MONTH($H$4)),H6,)
    > --------------------
    > . if i were to add a function in the false statement, it will only
    > allow this 6 or 7 times. is there a way to get around this using
    > functions?
    >
    > eg.
    > Code:
    > --------------------
    > =IF(MONTH(TODAY())=(MONTH(Trends!$H$4)),Trends!H6,IF(MONTH(TODAY())=(MONTH(Trends!$H$4)),Trends!H6IF(MONTH(TODAY())=(MONTH(Trends!$H$4)),Trends!H6IF(MONTH(TODAY())=(MONTH(Trends!$H$4)),Trends!H6)
    > --------------------
    >
    >
    > thanks
    >
    >
    > --
    > jay d
    > ------------------------------------------------------------------------
    > jay d's Profile: http://www.excelforum.com/member.php...o&userid=34487
    > View this thread: http://www.excelforum.com/showthread...hreadid=553261
    >
    >


  4. #4
    Registered User
    Join Date
    05-16-2006
    Posts
    18
    hi

    i want to have this
    Please Login or Register  to view this content.
    but its more than 7 functions...

    thanks

  5. #5
    JMB
    Guest

    Re: function within a function

    You should be able to adjust the ranges as follows:

    =INDEX(trends!F6:06,MATCH(MONTH(TODAY()),MONTH(trends!F4:O4),0))

    Again, it is an array formula, so you will need to hit Control+Shift+Enter
    when you key it in, not just the Enter key. If you do it right, Excel will
    put braces { } around the formula.



    "jay d" wrote:

    >
    > hi
    >
    > i want to have this
    >
    > Code:
    > --------------------
    > =IF(MONTH(TODAY())=(MONTH(Trends!$f$4)),Trends!f6,IF(MONTH(TODAY())=(MONTH(Trends!$g$4)),Trends!g6, IF(MONTH(TODAY())=(MONTH(Trends!$H$4)),Trends!H6, IF(MONTH(TODAY())=(MONTH(Trends!$i$4)),Trends!i6, IF(MONTH(TODAY())=(MONTH(Trends!$j$4)),Trends!j6, IF(MONTH(TODAY())=(MONTH(Trends!$k$4)),Trends!k6, IF(MONTH(TODAY())=(MONTH(Trends!$l$4)),Trends!l6,IF(MONTH(TODAY())=(MONTH(Trends!$m$4)),Trends!m6, IF(MONTH(TODAY())=(MONTH(Trends!$n$4)),Trends!n6, IF(MONTH(TODAY())=(MONTH(Trends!$o$4)),Trends!o6,)
    > --------------------
    >
    >
    > but its more than 7 functions...
    >
    > thanks
    >
    >
    > --
    > jay d
    > ------------------------------------------------------------------------
    > jay d's Profile: http://www.excelforum.com/member.php...o&userid=34487
    > View this thread: http://www.excelforum.com/showthread...hreadid=553261
    >
    >


  6. #6
    Registered User
    Join Date
    05-16-2006
    Posts
    18
    cheers for that, didnt know you could do that in excel

+ 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