Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 440
Default COUNTIF with dates

Dates in a column are formatted thus: 18/06/2007.
How can I adapt the COUNTIF formula to look at these dates (going back to
1986) and report back on the year part?
Any ideas?
--
tia

Jock
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default COUNTIF with dates

What do you expect COUNTIF() to report?

If you want to count the number of dates in 1998, one way:

=COUNTIF(A:A,"<"&DATE(1999,1,1))-COUNTIF(A:A,"<"&DATE(1998,1,1))

or

=SUMPRODUCT(--(YEAR(A1:A10000)=1998))

In article ,
Jock wrote:

Dates in a column are formatted thus: 18/06/2007.
How can I adapt the COUNTIF formula to look at these dates (going back to
1986) and report back on the year part?
Any ideas?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default COUNTIF with dates

One guess ..

Something like this in say, B1:
=SUMPRODUCT(--(YEAR(A1:A100)=1987))
will count the number of dates within A1:A100 with the year 1987
(dates within A1:A100 are assumed real dates)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Jock" wrote:
Dates in a column are formatted thus: 18/06/2007.
How can I adapt the COUNTIF formula to look at these dates (going back to
1986) and report back on the year part?
Any ideas?
--
tia

Jock

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 440
Default COUNTIF with dates

I would like to know how many times '1998' appears in the list (and so on for
the other years too), but the problem is where there is text in a cell as
well as a date that the formula cames back with #value
--
tia

Jock


"JE McGimpsey" wrote:

What do you expect COUNTIF() to report?

If you want to count the number of dates in 1998, one way:

=COUNTIF(A:A,"<"&DATE(1999,1,1))-COUNTIF(A:A,"<"&DATE(1998,1,1))

or

=SUMPRODUCT(--(YEAR(A1:A10000)=1998))

In article ,
Jock wrote:

Dates in a column are formatted thus: 18/06/2007.
How can I adapt the COUNTIF formula to look at these dates (going back to
1986) and report back on the year part?
Any ideas?


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 340
Default COUNTIF with dates

If there's text too maybe try array-entered (using ctrl+shift+enter)
eg:

=COUNT(FIND(1998,A$1:A$100))



On 18 Jun, 17:35, Jock wrote:
I would like to know how many times '1998' appears in the list (and so on for
the other years too), but the problem is where there is text in a cell as
well as a date that the formula cames back with #value
--
tia

Jock

"JE McGimpsey" wrote:
What do you expect COUNTIF() to report?


If you want to count the number of dates in 1998, one way:


=COUNTIF(A:A,"<"&DATE(1999,1,1))-COUNTIF(A:A,"<"&DATE(1998,1,1))


or


=SUMPRODUCT(--(YEAR(A1:A10000)=1998))


In article ,
Jock wrote:


Dates in a column are formatted thus: 18/06/2007.
How can I adapt the COUNTIF formula to look at these dates (going back to
1986) and report back on the year part?
Any ideas?



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
CountIF with dates Secret Squirrel Excel Discussion (Misc queries) 13 November 15th 06 09:08 PM
using countif to add dates jwmillzy Excel Discussion (Misc queries) 2 June 2nd 06 06:27 PM
COUNTIF using Dates WLMPilot Excel Worksheet Functions 1 October 7th 05 12:51 AM
Countif using dates Bugaglugs Excel Worksheet Functions 11 August 23rd 05 05:16 PM
countif and dates JAF New Users to Excel 2 December 3rd 04 04:45 PM


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