Or, for example, for the year 2015 try this:
=COUNTIFS(A1:A50,">="&DATE(2015,1,1),  A1:A50,"<="&DATE(2015,12,31))

On Wed, Oct 5, 2016 at 9:55 PM, Brian Barker <[email protected]>
wrote:

> At 17:30 05/10/2016 -0600, F H Data wrote:
>
>> I have yyyy-mm-dd as my date format in Calc (libreoffice 5.1.5.2) . I
>> like to count number of cells for a certain year *only* ....
>>
>> sample data :
>> 2011-03-28
>> [...]
>>
>> for any year, let say 2011, gives me err510
>> =COUNTIF(A1:A50,DATE(2011,*))
>>
>
> Ho, ho - you are making it up!
>
> o In B1, enter =TEXT(A1,"YYYY") and fill down the column.
> o Use =COUNTIF(B1:B50,"2011") .
>
> Or:
> o In B1, enter =VALUE(TEXT(A1,"YYYY")) and fill down the column.
> o Use =COUNTIF(B1:B50,2011) .
>
> Note that the column here suggested as B can be hidden or put away
> elsewhere on the sheet or even on another sheet.
>
> I trust this helps.
>
> Brian Barker
>
>
> --
> To unsubscribe e-mail to: [email protected]
> Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-uns
> ubscribe/
> Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
> List archive: http://listarchives.libreoffice.org/global/users/
> All messages sent to this list will be publicly archived and cannot be
> deleted
>
>

-- 
To unsubscribe e-mail to: [email protected]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Reply via email to