5.5 C
London
Saturday, December 21, 2024
HomeStatistics TutorialStatologyHow to Count by Year in Excel

How to Count by Year in Excel

Related stories

Learn About Opening an Automobile Repair Shop in India

Starting a car repair shop is quite a good...

Unlocking the Power: Embracing the Benefits of Tax-Free Investing

  Unlocking the Power: Embracing the Benefits of Tax-Free Investing For...

Income Splitting in Canada for 2023

  Income Splitting in Canada for 2023 The federal government’s expanded...

Can I Deduct Home Office Expenses on my Tax Return 2023?

Can I Deduct Home Office Expenses on my Tax...

Canadian Tax – Personal Tax Deadline 2022

  Canadian Tax – Personal Tax Deadline 2022 Resources and Tools...

You can use the following formula to count the number of occurrences by year in an Excel spreadsheet:

=SUMPRODUCT(1*(YEAR(A1:A10)=2020))

This particular formula counts the number of dates in the range A1:A10 that occur in the year 2020.

The following example shows how to use this formula in practice.

Example: Count by Year in Excel

Suppose we have the following dataset that shows the sales of some product on various dates:

Now suppose we’d like to count the number of dates by year.

To generate a list of unique years, we can use the following formula:

=SORT(UNIQUE(YEAR(A2:A15)))

We’ll type this formula into cell D2:

Next, we can use the following formula to count the number of dates by year:

=SUMPRODUCT(1*(YEAR($A$2:$A$15)=D2))

We’ll type this formula into cell E2, then copy and paste it into each remaining cell in column E:

Excel count by year

From the output we can see:

  • The year 2018 occurred 2 times.
  • The year 2019 occurred 3 times.
  • The year 2020 occurred 2 times.

And so on.

Additional Resources

The following tutorials explain how to perform other common tasks in Excel:

How to Count by Month in Excel
How to Use COUNTIF with OR in Excel
How to Count If Cells Contain Text in Excel
How to Count Unique Values Based on Multiple Criteria in Excel

Subscribe

- Never miss a story with notifications

- Gain full access to our premium content

- Browse free from up to 5 devices at once

Latest stories