Offset Formula - Rolling total

Li_zzza

New Member
Joined
Oct 3, 2017
Messages
13
Hi All,

I am working with a database that needs the rolling total of the last 3 months. For example, let say we are in June. One column will Sum the total of Mar, April, May. Another column for Feb, March, April. And the last one being Jan, Feb, March.

I have figured out how to calculate the rolling total if there is a full set of data (Jan to Dec). Using =SUM(OFFSET($A3,0,COUNT($B3:$M3)-2,1,-3)) ; =SUM(OFFSET($A3,0,COUNT($B3:$M3)-1,1,-3)) ; =SUM(OFFSET($A3,0,COUNT($B3:$M3),1,-3))

How do I calculate the totals if we are in March and the data has not come in for the rest of the months? Ideally I want it to look like something below.

Months
JanFebMarchTotal of last 3 monthsTotal of last 3 months minus last monthtotal of last 3 months minus last 2 months
Hours231652
23552

<tbody>
</tbody>
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Forum statistics

Threads
1,213,520
Messages
6,114,099
Members
448,548
Latest member
harryls

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