A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
You are welcome.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Good day to all! I feel like there is a simple solution to my problem, but i cannot figure it out. In EXCEL I have a list of 5000 random dates in column A which span several years and there repeating (or duplicate) dates in the list. I want to count the number of unique dates for a given year. (e.g. How many unique dates in the list were from 2014?) Any solution or insight is greatly appreciated. Thank you!
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Answer accepted by question author
You are welcome.
Ashish, thank you for commenting on my question. Your formula didn't work initially, as the cell result was the #CALC error. I realized that you might have forgot to include the COUNT function in your reply to this post. The resulting formula that solved the issue is:
=COUNT(UNIQUE(FILTER(A2:A5001,YEAR(A2:A5001)=C1)))
I didn't know that the FILTER function could solve the problem.
Sheeloo, I appreciate your input. Your solution provided me with the total number of unique dates, but I need to extract the total number for a given year.
Hi,
Assuming the dates are in range A2:A5001, type 2014 in cell C1 and enter this formula in cell C3
=unique(filter(A2:A5001,year(A2:A5001)=C1))
Hope this helps.
If you version of Excel has UNIQUE function then try
=COUNTA(UNIQUE(A:A))-2