Count number of times a date occurs and make a graph out of it

ExcelDateGraphExcel 2010Unique

Excel Problem Overview


I have a list of dates, each date in it can occur more than once. I want to count the number of times each date occurs (histogram) and display it in a graph (with the Y axis being the number of times the date occurs and the X axis being the date itself)?

Sample list:

19/05/2012
19/05/2012
19/05/2012
17/05/2012
17/05/2012
16/05/2012
16/05/2012
16/05/2012
16/05/2012
15/05/2012
15/05/2012
15/05/2012
15/05/2012
12/05/2012
12/05/2012
12/05/2012
7/05/2012

I clicked every menu option over the past few years and never did I find anything specific to this. Would this be a case for using PivotTables somehow?

Excel Solutions


Solution 1 - Excel

The simplest is to do a PivotChart. Select your array of dates (with a header) and create a new Pivot Chart (Insert / PivotChart / Ok) Then on the field list window, drag and drop the date column in the Axis list first and then in the value list first.

Step 1:

Step1

Step 2:

Step2

Solution 2 - Excel

If you have Excel 2010 you can copy your data into another column, than select it and choose Data -> Remove Duplicates. You can then write =COUNTIF($A$1:$A$100,B1) next to it and copy the formula down. This assumes you have your values in range A1:A100 and the de-duplicated values are in column B.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionSystemX17View Question on Stackoverflow
Solution 1 - ExceledeboursettyView Answer on Stackoverflow
Solution 2 - ExcelmartinView Answer on Stackoverflow