+ Reply to Thread
Results 1 to 2 of 2

INDIRECT COUNTIF's??

  1. #1
    Registered User
    Join Date
    09-29-2005
    Posts
    28

    INDIRECT COUNTIF's??

    Can you mix this statement:


    VBA:

    =COUNTIF( '2005'!B6:B370,"L")

    of which counts all the L's that appear from B6 to B370 on tab sheet 2005 with this one:


    VBA:

    =INDIRECT("'"&YEAR(NOW())&"'!B1")

    of which finds out what year it is and then points itself to the correct tab sheet, baring in mind that the tab sheets are named after the years so like 2005 2006 2007 etc..

    Anyway what i want is like an indirect countif statement, i need the function of the countif statement but where it says '2005' i need that number to be determined by what the year currently is, of which is where the functionality of the indirect statement comes in, so depending on what year it is depends on the tab sheet but it needs to countif still.

    Is this possible?

  2. #2
    Bob Phillips
    Guest

    Re: INDIRECT COUNTIF's??

    =COUNTIF(INDIRECT("'"&YEAR(TODAY())&"'!B6:B370"),"L")


    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "alymcmorland" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Can you mix this statement:
    >
    >
    > VBA:
    >
    > =COUNTIF( '2005'!B6:B370,"L")
    >
    > of which counts all the L's that appear from B6 to B370 on tab sheet
    > 2005 with this one:
    >
    >
    > VBA:
    >
    > =INDIRECT("'"&YEAR(NOW())&"'!B1")
    >
    > of which finds out what year it is and then points itself to the
    > correct tab sheet, baring in mind that the tab sheets are named after
    > the years so like 2005 2006 2007 etc..
    >
    > Anyway what i want is like an indirect countif statement, i need the
    > function of the countif statement but where it says '2005' i need that
    > number to be determined by what the year currently is, of which is
    > where the functionality of the indirect statement comes in, so
    > depending on what year it is depends on the tab sheet but it needs to
    > countif still.
    >
    > Is this possible?
    >
    >
    > --
    > alymcmorland
    > ------------------------------------------------------------------------
    > alymcmorland's Profile:

    http://www.excelforum.com/member.php...o&userid=27652
    > View this thread: http://www.excelforum.com/showthread...hreadid=483449
    >




+ 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