Clément Hurel
Clément Hurel

Reputation: 87

How do I count a number of different dates in the same column?

I'm currently working on a project for a business in which I have to display how much we make per hour and per day (i'm using pivot tables): My first column is "Dates" The second one is "Hours" The third one is "Turnover"

The idea is that the hours column is as followed:

<8:00

8:00-9:00

9:00-10:00

...

17:00-18:00

18:00<

Which means that my dates column include 13 times the same date for each day (I want it to be count as 1 and not 13)

The idea is to display, the sum of days opened per month and per year (in order to display a pivot table graph)

You'll find enclosed a screenshot that shows the sheet, column 2 and 3 are not part of the problem.

Excel Sheet example

Upvotes: 0

Views: 154

Answers (1)

EFT
EFT

Reputation: 2369

=SUM(IF(FREQUENCY(A:A,A:A)>0,1))

counts the distinct numbers, which Excel considers dates to be, in column A.

Source: https://support.office.com/en-us/article/count-unique-values-among-duplicates-8d9a69b3-b867-490e-82e0-a929fbc1e273

Upvotes: 1

Related Questions