Thread: Moving total
View Single Post
  #2   Report Post  
Ragdyer
 
Posts: n/a
Default

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)*B 2:Y2)
And drag down to copy.

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"snn" wrote in message
...
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.
--
SNN