Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 33
Default counting dates using SUMPRODUCT

I have a column with 100 rows that will eventually contain a publication
date. Those cells are formatted as dates. Some of the cells in the column
have dates and I need to count the number of publication dates in July,
August, etc. I'm using the formula

=SUMPRODUCT(--(MONTH(A1:A100)=7))

[7 being the number that represents July] and the formula yields the number
of publication dates in July.

My problem is that the formula is counting every blank cell as a January
date.
Any help you can give is greatly appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 913
Default counting dates using SUMPRODUCT

On Mon, 27 Jul 2009 15:52:01 -0700, Marge
wrote:

I have a column with 100 rows that will eventually contain a publication
date. Those cells are formatted as dates. Some of the cells in the column
have dates and I need to count the number of publication dates in July,
August, etc. I'm using the formula

=SUMPRODUCT(--(MONTH(A1:A100)=7))

[7 being the number that represents July] and the formula yields the number
of publication dates in July.

My problem is that the formula is counting every blank cell as a January
date.
Any help you can give is greatly appreciated.


Try modifying your formula for January like this:

=SUMPRODUCT((MONTH(A1:A100)=1)*(A1:A100<""))

Hope this helps / Lars-Åke
  #3   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default counting dates using SUMPRODUCT

This way, using both month/year would always be unambiguous, eg:
=SUMPRODUCT(--(TEXT(A1:A100,"mmmyy")="Jan09"))

--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"Marge" wrote:
I have a column with 100 rows that will eventually contain a publication
date. Those cells are formatted as dates. Some of the cells in the column
have dates and I need to count the number of publication dates in July,
August, etc. I'm using the formula

=SUMPRODUCT(--(MONTH(A1:A100)=7))

[7 being the number that represents July] and the formula yields the number
of publication dates in July.

My problem is that the formula is counting every blank cell as a January
date.
Any help you can give is greatly appreciated.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 33
Default counting dates using SUMPRODUCT

Thank you! What I actually did was add a string to count the Januarys
greater than 2000 and it worked fine.

Thanks again for your help.

"Max" wrote:

This way, using both month/year would always be unambiguous, eg:
=SUMPRODUCT(--(TEXT(A1:A100,"mmmyy")="Jan09"))

--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"Marge" wrote:
I have a column with 100 rows that will eventually contain a publication
date. Those cells are formatted as dates. Some of the cells in the column
have dates and I need to count the number of publication dates in July,
August, etc. I'm using the formula

=SUMPRODUCT(--(MONTH(A1:A100)=7))

[7 being the number that represents July] and the formula yields the number
of publication dates in July.

My problem is that the formula is counting every blank cell as a January
date.
Any help you can give is greatly appreciated.

  #5   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default counting dates using SUMPRODUCT

Welcome, glad you got going there
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"Marge" wrote in message
...
Thank you! What I actually did was add a string to count the Januarys
greater than 2000 and it worked fine.

Thanks again for your help.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting non blanks with SUMPRODUCT? Mifty Excel Discussion (Misc queries) 4 February 7th 08 01:00 PM
counting occasions dates occur between 2 dates hoyt New Users to Excel 5 June 16th 06 08:11 AM
Counting dates, within a list of dates jrheinschm Excel Worksheet Functions 7 April 19th 06 06:13 PM
do I need array formula or sumproduct for counting? Karin Excel Worksheet Functions 3 March 30th 06 05:50 PM
sumproduct--counting--zero--blank cells jeremy via OfficeKB.com Excel Discussion (Misc queries) 4 August 16th 05 03:22 PM


All times are GMT +1. The time now is 03:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"