Author: Oscar Cronquist Article last updated on November 15, 2018

Question: How to create unique distinct year and months from a long date listing (column A)?
You can find the question in this post: Extract dates using a drop down list

Update! 2017-08-23, a smaller easier regular formula:


You can also easily extract a unique distinct list of dates with a pivot table:

Discover Pivot Tables – Excel’s most powerful feature and also least known

A pivot table allows you to examine data more efficiently, it can summarize large amounts of data very quickly and is very easy to use.

Discover Pivot Tables – Excel’s most powerful feature and also least known

Explaining formula in cell

Step 1 - Convert dates into a given format

The TEXT function lets you convert a value based on a formatting code, in this case we want to convert the date into month and year.

The reason is we want to count previous values against this array to make sure no duplicates show up.




and returns


Step 2 - Count previous values

The COUNTIF function allows us to count values displayed above the current cell using an expanding cell reference.





COUNTIF("Unique distinct list",{"Oct-2009";"Oct-2009";"Nov-2009";"Nov-2009";"Jan-2010";"Jan-2010";"Jan-2010";"Feb-2010"})

and returns


Step 3 - Values represented by a zero has not been displayed yet




and returns