I'm using Sumif function to calculate the amount for each year based on the data for months. For doing this, I'm calculating the year based on the months & then using the year for Sumif function. It is giving me the correct result.
However, I would like to avoid calculating the year separately. Instead, would it be better to get the year from the months & use it in the Sumif function?
Sample table is shown below.
At present, I'm using Year() function to calculate the year of the date in a separate column.
This value of year is used in Sumif function. Instead, wanted to derive year from the date & use it in Sumif function. With this, I need not have a separate column for year.
However, I would like to avoid calculating the year separately. Instead, would it be better to get the year from the months & use it in the Sumif function?
Sample table is shown below.
At present, I'm using Year() function to calculate the year of the date in a separate column.
Excel Formula:
=YEAR(B2)
This value of year is used in Sumif function. Instead, wanted to derive year from the date & use it in Sumif function. With this, I need not have a separate column for year.
Excel Formula:
=SUMIF($D$2:$D$10,G2,$C$2:$C$10)