Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Using COUNTIF or SUMPRODUCT for Year

I have a column of dates in numeric format of dd/mm/year, and have tried two
different formulas to count the number that fall in a specific year.

When I use the formula
=SUMPRODUCT(--(YEAR(C4:C24)=2001))
it returns the #VALUE! error

I've tried variations of the COUNTIF formula, to no avail either. Any
suggestions? Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,268
Default Using COUNTIF or SUMPRODUCT for Year

It's because you have text values in C4:C24 and YEAR will return the value
error

Try


=ISNUMBER(C4)

copy down 20 rows and anywhere you will see FALSE there is a text string

maybe you have blank cells derived from formulas like IF(A1=X,"", A1)
or trailing or leading spaces

--


Regards,


Peo Sjoblom



"PSmith" wrote in message
...
I have a column of dates in numeric format of dd/mm/year, and have tried
two
different formulas to count the number that fall in a specific year.

When I use the formula
=SUMPRODUCT(--(YEAR(C4:C24)=2001))
it returns the #VALUE! error

I've tried variations of the COUNTIF formula, to no avail either. Any
suggestions? Thanks



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Using COUNTIF or SUMPRODUCT for Year

Thanks for the suggestion. Upon closer examination, I noticed not all were in
the format of dd/mm/yyyy (some were mm/dd/yyyy). thanks once again,

"Peo Sjoblom" wrote:

It's because you have text values in C4:C24 and YEAR will return the value
error

Try


=ISNUMBER(C4)

copy down 20 rows and anywhere you will see FALSE there is a text string

maybe you have blank cells derived from formulas like IF(A1=X,"", A1)
or trailing or leading spaces

--


Regards,


Peo Sjoblom



"PSmith" wrote in message
...
I have a column of dates in numeric format of dd/mm/year, and have tried
two
different formulas to count the number that fall in a specific year.

When I use the formula
=SUMPRODUCT(--(YEAR(C4:C24)=2001))
it returns the #VALUE! error

I've tried variations of the COUNTIF formula, to no avail either. Any
suggestions? Thanks




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Using COUNTIF or SUMPRODUCT for Year

What does =YEAR(C4) return (and similarly for the rest of column C)? Are
you sure that you haven't got text, rather than dates, in column C? If you
have, Excel will often translate them to date if they are in the format
expected by your regional settings, but if (for example) your windows
regional settings are looking for mm/dd/yyyy, you'll probably get #VALUE!
responses if you've got dd/mm/yyyy text entries. Similarly if you have a
non-date entry, you'll get #VALUE!
--
David Biddulph

"PSmith" wrote in message
...
I have a column of dates in numeric format of dd/mm/year, and have tried
two
different formulas to count the number that fall in a specific year.

When I use the formula
=SUMPRODUCT(--(YEAR(C4:C24)=2001))
it returns the #VALUE! error

I've tried variations of the COUNTIF formula, to no avail either. Any
suggestions? Thanks



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 month & year Saintsman Excel Worksheet Functions 2 April 25th 07 12:54 PM
sumproduct for month and year Benjamin Excel Discussion (Misc queries) 1 September 20th 06 04:29 PM
sumproduct in a given year Bumblebee Excel Worksheet Functions 8 August 19th 06 06:59 PM
Countif by Year heater Excel Discussion (Misc queries) 17 September 2nd 05 06:52 PM
countif number of occurences per month per year. Pete Petersen Excel Worksheet Functions 2 January 4th 05 03:47 PM


All times are GMT +1. The time now is 05:20 AM.

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"