Lookup & Add corresponding values for date range

goble

New Member
Joined
Oct 7, 2010
Messages
48
Office Version
  1. 2019
Platform
  1. Windows
Hello,

Am trying to get total amount of values by year. Thanks for your help !

DateAmount
01-Mar-23
15​
15-Aug-23
10​
25-Sep-24
20​
09-Dec-24​
18​
*** Results ***
YearSum
2023​
25​
2024​
38​
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
One way:

1706200106574.png


Formula in cell B10:
Excel Formula:
=SUMPRODUCT(--(YEAR(A$2:A$5)=A10),(B$2:B$5))
and copy down to B11
 
Upvote 1
Solution
Excel Formula:
= SUMPRODUCT( --(YEAR($A$2:$A$5)=A8) * ($B$2:$B$5))

1706200262717.png
 
Last edited:
Upvote 0
You are welcome.
Glad we were able to help!

You can also use a SUMIFS formula, though it would be a little longer.
That is a great option is trying to total between two dates that may not necessarily be year start/end dates.
See: Excel SUMIFS date range formula - sum if between two dates
Many thanks, this is perfect when you want to keep track of your current sales figures (for this FY vs last FY).
Example Jan 2023 vs Jan 2024 and as such you'll know in real time how the sales are doing ;-)
I will for sure implement this solution as well.

Again thanks and have a wonderful day !
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top