I have several dates in let's say:A1:A with this syntax: dd/mm/yyyy and I would like to COUNTIF the cells that are years. I started with this formula, but that didn't work:=COUNTA(UNIQUE(YEAR(A1:A)))
How to COUNTIF cells are years in Google Spreadsheet?
google spreadsheets
Use this formula:Formula=COUNTUNIQUE(ARRAYFORMULA(IFERROR(YEAR(A1:A15))))ExplainedThe ARRAYFORMULA around the YEAR formula makes it possible to accept a range. The COUNTUNIQUE counts the unique entries. It's simply a combination of COUNT and UNIQUE.ExampleI've created an example file for you: COUNT UNIQUE YEARS