+ Reply to Thread
Results 1 to 6 of 6

Silly question about using dates

  1. #1
    Zerosumgame
    Guest

    Silly question about using dates

    I have a multi-page worksheet, sorted out by date and type of work done. I am
    looking for a reasonable way to COUNT all the entries in certain months.
    Every function i try errors out. And combining MONTH with COUNTIF does not
    seem to work. i do not want to SUM them, just to COUNT them.

  2. #2
    JMB
    Guest

    RE: Silly question about using dates

    Don't discount the sum functions for counting

    =SUMPRODUCT(--(MONTH(A1:A5)=2))

    will count all of the dates in A1:A5 that are February (ie equal to 2).

    You could also use the regular sum function, but it would have to comitted
    w/Control+Shift+Enter

    =SUM(--(MONTH(A1:A5)=2))



    "Zerosumgame" wrote:

    > I have a multi-page worksheet, sorted out by date and type of work done. I am
    > looking for a reasonable way to COUNT all the entries in certain months.
    > Every function i try errors out. And combining MONTH with COUNTIF does not
    > seem to work. i do not want to SUM them, just to COUNT them.


  3. #3
    zerosumgame
    Guest

    RE: Silly question about using dates

    I should add that it seems named ranges do not work in the MONTH command. Am
    I wrong on that or just doing it wrong?

    "Zerosumgame" wrote:

    > I have a multi-page worksheet, sorted out by date and type of work done. I am
    > looking for a reasonable way to COUNT all the entries in certain months.
    > Every function i try errors out. And combining MONTH with COUNTIF does not
    > seem to work. i do not want to SUM them, just to COUNT them.


  4. #4
    Gilles Desjardins
    Guest

    Re: Silly question about using dates

    Let me take a wild guess: Try COUNTA(X?:X?)

    See if that works. Replacethe X and ? by your own reference

    Gilles
    "Zerosumgame" <[email protected]> wrote in message
    news:[email protected]...
    >I have a multi-page worksheet, sorted out by date and type of work done. I
    >am
    > looking for a reasonable way to COUNT all the entries in certain months.
    > Every function i try errors out. And combining MONTH with COUNTIF does not
    > seem to work. i do not want to SUM them, just to COUNT them.




  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    There's no reason that you can't use named ranges like

    =SUMPRODUCT(--(MONTH(daterange)=2))

    .....but you might need to be careful with this formula when counting January, empty cells will be counted also, so use

    =SUMPRODUCT(--(MONTH(daterange)=1),--ISNUMBER(daterange))

  6. #6
    Ron Rosenfeld
    Guest

    Re: Silly question about using dates

    On Fri, 31 Mar 2006 16:33:01 -0800, Zerosumgame
    <[email protected]> wrote:

    >I have a multi-page worksheet, sorted out by date and type of work done. I am
    >looking for a reasonable way to COUNT all the entries in certain months.
    >Every function i try errors out. And combining MONTH with COUNTIF does not
    >seem to work. i do not want to SUM them, just to COUNT them.



    =COUNTIF(rng,">="&DATE(2006,1,1)) - COUNTIF(rng,">"&DATE(2006,1,31)

    will give you the count for the month of January 2006

    Perhaps you can adapt this to your issue?

    If you want the count for ALL january's , then SUMPRODUCT will work.
    --ron

+ 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