rammi
rammi

Reputation: 81

Sum up every 12 months in Excel

I have values in the column from b10 to b70. I want to sum up every 12 columns and keep that sum number in different column of cells.

I'm using a if condition here. If that condition is true then I have to sum up every 12 column and store those values in different cells.

here i'm attaching the sample one. f column have the values from f8 to so on.. and the sum up values should store in h column and have a value 40 in c8.

so condition is if(c8=40, then the sum up of every 12 rows in f column from f8:f20, f21:f33 so on and store in h column rows,"")

those sum up values should stored in h column

can u help me please.. enter image description here

Upvotes: 1

Views: 1410

Answers (1)

James Chen
James Chen

Reputation: 237

1st 12months

=SUM(OFFSET($F:$F,MATCH(40,$C:$C,0)-1,0,12))

2nd,3rd,4th 12 months

=SUM(OFFSET($F:$F,MATCH(40,$C:$C,0)+11,0,12))
=SUM(OFFSET($F:$F,MATCH(40,$C:$C,0)+23,0,12))
=SUM(OFFSET($F:$F,MATCH(40,$C:$C,0)+35,0,12))

or 1st 12

    =IF($C$8=40,SUM(OFFSET($F:$F,7,0,12)),0)

then just add 12 to 7 for each additional 12 months

Upvotes: 1

Related Questions