sum last 12 values

wasntme

New Member
Joined
Feb 1, 2019
Messages
37
Hello,

I have a spreadsheet in which is added data in 2 columns each month at the end of the sheet, called "NET" and "VAT". I am trying to write a formula that sums entries from last 12 columns "NET" (one formula for last 12 "NET" columns, f.e AK, AI, AG, AE etc) and "VAT" (another formula for last 12 "VAT" columns, f.e AL, AJ, AH, AF etc) (yearly review) no matter how many they are.

I am using for similar purpose (summing last 12 entries, but here is added just one column monthly) this formula:
Code:
=ROUND(SUM(INDEX(I15:ZT15,MATCH(9^9,I$12:ZT$12)-11):ZT15),2)

but do not understand it well enough to rework it for my needs.

Any help is greatly appreciated.
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Any help is greatly appreciated.
If I understand you try this formulas below

In 'A3' cell, helper formula (Related to the range in Row 12, return the start column from which the sum starts)
Code:
=CHAR(64+(MAX(COLUMN(I15:ZT15)*(I15:ZT15<>""))-24)+1)&(ROW(A15)-3)
In 'B3' cell, helper formula (Related to the range in Row 15, return the start column from which the sum starts.)
Code:
=CHAR(64+(MAX(COLUMN(I15:ZT15)*(I15:ZT15<>""))-24)+1)&ROW(A15)
In 'D3' cell, SUM formula for last 12 Cells based on 'COL' header (copy across)
Code:
=SUM(IF(INDIRECT($A$3&":ZT12")=D$2;INDIRECT($B$3&":ZT15");0))
I hope it helped.

ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQARASATAUAV
1
21st col1st colVATNET
3V12V151213
4
5
6
7
8
9
10
11
12TitleVATNETVATNETVATNETVATNETVATNETVATNETVATNETVATNETVATNETVATNETVATNETVATNETVATNETVATNETVATNETVATNETVATNETVATNETVATNETVAT
13
14
15aaa1111111111111111111111111111111111121
16

<tbody>
</tbody>

[EDIT]:
I apologize, I forgot to mention that all ARRAY formulas.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,846
Messages
6,121,905
Members
449,054
Latest member
luca142

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