+ Reply to Thread
Results 1 to 5 of 5

Count when each month occurs excluding 00/01/1900

  1. #1
    Registered User
    Join Date
    09-24-2012
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    9

    Count when each month occurs excluding 00/01/1900

    Hi,

    I am trying to count the amount of times each month occurs in a column using the formula =SUMPRODUCT(--(C$3:C$6<>""),--(MONTH(C$3:C$6)=1)) with the date in the cell reading 12/01/2012, 11/02/2012, etc. However, I have cells which show 00/01/1900 and although I have blanked these cells out by formatting theses cells, they still seem to be counted - any ideas?

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Count when each month occurs excluding 00/01/1900

    Hi

    One way could be to add one more criterion in your formula, regarding the year.

    =SUMPRODUCT(--(C$3:C$6<>""),--(MONTH(C$3:C$6)=1),--(year(c$3:c$6)=2012))
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

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

    Re: Count when each month occurs excluding 00/01/1900

    If the cell displays 00/01/1900 then the underlying value is zero, so try excluding zeroes rather than blanks

    =SUMPRODUCT((C$3:C$6>0)*(MONTH(C$3:C$6)=1))
    Audere est facere

  4. #4
    Registered User
    Join Date
    09-24-2012
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Count when each month occurs excluding 00/01/1900

    Thanks for the replies. Need to wait until I get into work to check the spreadsheet. I'll let you know how I got on. Thanks in advance.

  5. #5
    Registered User
    Join Date
    09-24-2012
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Count when each month occurs excluding 00/01/1900

    Both formulas worked a treat. Thanks for your help.

+ 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