Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Formula to assist with counting dates

I am using the formula below to count the number of dates in a certain month
and year from a random list of dates. However my "list" of dates is not a
continuous string of dates and is split by some text and some headings. When
i use this formula it highlights a value error. Is their any way around this
??

=SUMPRODUCT(--(MONTH(A1:A100)=2),--(YEAR(A1:A100)=2009))

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 793
Default Formula to assist with counting dates

Try
=SUMPRODUCT(--(MONTH(IF(ISNUMBER(A1:A100),A1:A100,0))=2),--(YEAR(IF(ISNUMBER(A1:A100),A1:A100,0))=2009))

This is an Array formula, so press CTRL-ENTER-SHIFT after typing/pasting.

"Dilly" wrote:

I am using the formula below to count the number of dates in a certain month
and year from a random list of dates. However my "list" of dates is not a
continuous string of dates and is split by some text and some headings. When
i use this formula it highlights a value error. Is their any way around this
??

=SUMPRODUCT(--(MONTH(A1:A100)=2),--(YEAR(A1:A100)=2009))

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,231
Default Formula to assist with counting dates

Sheeloo wrote...
Try

=SUMPRODUCT(--(MONTH(IF(ISNUMBER(A1:A100),A1:A100,0))=2),
--(YEAR(IF(ISNUMBER(A1:A100),A1:A100,0))=2009))

This is an Array formula, so press CTRL-ENTER-SHIFT after typing/pasting.

....

Yes, it is an array formula, so why not use

=SUM(IF(ISNUMBER(A1:A100),(MONTH(A1:A100)=2)*(YEAR (A1:A100)=2009)))

or avoid array formulas and use

=SUMPRODUCT(--(TEXT(A1:A100,"yyyy\-mm;;;")="2009-02"))
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
Formula to assist with counting dates Dilly Excel Discussion (Misc queries) 9 May 8th 09 06:25 PM
Formula to assist with Counting Dates Dilly Excel Discussion (Misc queries) 2 May 8th 09 04:01 PM
Need Assist With Formula Creation Rick Excel Worksheet Functions 3 December 28th 07 05:01 PM
Assist with Match Dates rhani111 Excel Discussion (Misc queries) 4 August 14th 06 11:19 AM
Formula Assist [email protected] Excel Discussion (Misc queries) 3 June 7th 06 12:37 AM


All times are GMT +1. The time now is 09:48 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"