How can I calculate the sum by year in Excel? 2

How can I calculate the sum by year in Excel?

To calculate the sum by year in Excel, follow these steps:
1. Organize your data in a table with columns for the year and the values you want to sum.
2. Use the SUMIF function to specify the criteria for the sum, in this case, the year.
3. Select the range of values you want to sum, and then enter the criteria for the specific year in the formula.
4. Press Enter to get the sum for that specific year.
5. Copy the formula down the column to get the sum for each year.
6. You can also use the PivotTable feature to quickly calculate and display the sum by year.
Using these methods, you can easily calculate the sum by year in Excel for any set of data.

Sum by Year in Excel (Step-by-Step Example)


Often you may want to sum the values of some dataset in Excel based on year.

For example, suppose we have the following dataset and we’d like to sum the total sales by year:

The following step-by-step example shows how to do so.

Step 1: Enter the Data

First, enter the data values into Excel:

Step 2: Extract the Year from Dates

Next, we need to use the =YEAR() function to extract the year from each date.

In our example, we’ll type the following formula in cell D2:

=YEAR(A2)

We’ll then drag and fill this formula down to every remaining cell in column D:

Step 3: Find the Unique Years

Next, we need to use the =UNIQUE() function to produce a list of unique years.

In our example, we’ll type the following formula in cell F2:

=UNIQUE(D2:D10)

Step 4: Find the Sum by Year

Next, we will use the SUMIF(range, criterion, sum_range) function to find the sum of the sales made during each year.

In our example, we’ll type the following formula in cell G2:

=SUMIF($D$2:$D$10, F2, $B$2:$B$10)

We’ll then drag and fill this formula down to the remaining cells in column G:

This tells us:

  • There were 117 total sales made in 2022.
  • There were 50 total sales made in 2023.
  • There were 86 total sales made in 2024.
  • There were 25 total sales made in 2025.

Additional Resources

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

Cite this article

stats writer (2024). How can I calculate the sum by year in Excel?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-calculate-the-sum-by-year-in-excel/

stats writer. "How can I calculate the sum by year in Excel?." PSYCHOLOGICAL SCALES, 28 Jun. 2024, https://scales.arabpsychology.com/stats/how-can-i-calculate-the-sum-by-year-in-excel/.

stats writer. "How can I calculate the sum by year in Excel?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-i-calculate-the-sum-by-year-in-excel/.

stats writer (2024) 'How can I calculate the sum by year in Excel?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-calculate-the-sum-by-year-in-excel/.

[1] stats writer, "How can I calculate the sum by year in Excel?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.

stats writer. How can I calculate the sum by year in Excel?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.

Download Post (.PDF)
PDF
Scroll to Top