View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
PSmith PSmith is offline
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