Oct 06 2018 04:35 PM
I just need a single cell in which the number of unique years is returned in a long list of dates in YYYY/MM/DD format. NOT a calculation of a number but a simple count of each year with a date.
Scott
Oct 06 2018 05:11 PM
Oct 06 2018 08:20 PM
Hi Scott,
Please try this formula:
=SUMPRODUCT(--(FREQUENCY(YEAR(A1:A10),YEAR(A1:A10))<>0))
Hope that helps
Oct 07 2018 07:04 AM
Thank you, Detlef
It's a really great function as it can solve many problems!
Also, I've noticed that the SUM works here as well without the need to Ctrl+Shift+Enter!
=SUM(--(FREQUENCY(YEAR(A1:A10),YEAR(A1:A10))<>0))
This is because the FREQUENCY is a powerful array function!
Apr 06 2022 07:31 AM