Formula for the 4 most recent values related to a date

Nebula2121

New Member
Joined
Apr 1, 2016
Messages
32
Hi.

What is a formula to calculate the sum for the 4 most recent values based on a date value in a cell (E2)? The result that I am looking for is in (E5)


ABCDE
1DateValueValuation Date
204/22/2018207/22/2019
307/22/20185
410/22/201810Result
501/22/20191035
604/22/20195
707/22/201910

<tbody>
</tbody>
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hi, Are you looking for something like this:


Book1
ABCDE
1DateValueValuation Date
24/22/201824/22/2019
37/22/20185
410/22/201810Result
51/22/20191030
64/22/20195
77/22/201910
Sheet3
Cell Formulas
RangeFormula
E5=SUMPRODUCT(SUMIF($A$2:$A$7,LARGE(($A$2:$A$7<=$E$2)*(A2:A7),{1,2,3,4}),$B$2:$B$7))
 
Upvote 0

Forum statistics

Threads
1,215,237
Messages
6,123,807
Members
449,127
Latest member
Cyko

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