Moving total

S

snn

I have columns Jan04 to Dec05. I have rows A to E below each of the columns.
I have an input field say start month and end month. Depending on the input
criteria I wish to have the totals for each row. i.e:- if the start month is
Apr04 and end month is Mar05 , It should sum up the columns Apr04 to Mar05
for each of the rows.
 
R

Ragdyer

Say "Jan-04" to "Dec-05" is in B1 to Y1.
Row labels "A" to "E" are in A2 to A6.
Data is in B2 to Y6.

Start date criteria is in Z1, and end date criteria is in AA1.

Enter this formula in Z2:

=SUMIF($B$1:$Y$1,">="&$Z$1,B2:Y2)-SUMIF($B$1:$Y$1,">"&$AA$1,B2:Y2)
And drag down to copy.

You could also try this:

=SUMPRODUCT(($B$1:$Y$1>=$Z$1)*($B$1:$Y$1<=$AA$1)*B2:Y2)
And drag down to copy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top