Sumif and changing array
=SUMIF(A:A,"FY2007",B:B)
as SUMIF can take whole colums, the number of rows is immaterial
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
"csimont" wrote in message
...
I would love some help!!!!
I am trying to write a macro that would sumif data in column 12 based on
criteria in column 1 but with a different number of rows in different
worksheets. Within each worksheet, the data in column 1 would be grouped
(i.e. by fiscal year) and the macro for the sumif would subtotal each
group.
Year Clients
FY2007 5
FY2006 15
FY2005 25
FY2007 12
FY2006 28
FY2005 7
Macro would give back:
FY2007 17
FY2006 43
FY2005 32
The next worksheet would have a the same data but more or less rows to
calculate.
This is what I have so far:
ActiveCell.FormulaR1C1 =
"=SUMIF(R8C1:OFFSET(R3793C1,0,0),RC10,R8C:OFFSET(R 3793C,0,0))"
Thanks!
|