M
Matt
[Excel 2003 user, intermediate to advanced Macro skills]
I am working with a document that contains 11,000 items broken down
into 1,000 subtotals using the Excel Subtotal function.
The first 12 columns contain data and the subtotal at column 12 (L) is
a count of the items in that subtotal. There are 21 additional
columns to the right which will be used to record information, and
each of those columns will need subtotal formulas depending on their
data type.
For example, the first subtotal contains 20 rows and the Excel
generated subtotal formula is SUBTOTAL(3,L2:L21)
Columns (S,T,U,AA,AB,AC,AE,AF,AG,AL,AM) contain numerical data which
needs to be SUMmed with a formula like SUM(S2:S21)
Columns (V,W,X,Y,Z,AD,AH,AI,AJ,AK) contain Y/N answers and need to be
counted with a formula like CONCATENATE(COUNTIF(V2:V21,"Y")," /
",COUNTIF(V2:V21,"N"))
The problem I am having, is recreating all of these formulas for each
iteration of the Subtotal. There are 1,000 subtotals, each with
different quantity of rows, so the Range for each subtotal is
different.
How can I recreate these formulas for each Subtotal keeping the
formulas the same for each respective column, but only using the range
for each particular Subtotal?
I am working with a document that contains 11,000 items broken down
into 1,000 subtotals using the Excel Subtotal function.
The first 12 columns contain data and the subtotal at column 12 (L) is
a count of the items in that subtotal. There are 21 additional
columns to the right which will be used to record information, and
each of those columns will need subtotal formulas depending on their
data type.
For example, the first subtotal contains 20 rows and the Excel
generated subtotal formula is SUBTOTAL(3,L2:L21)
Columns (S,T,U,AA,AB,AC,AE,AF,AG,AL,AM) contain numerical data which
needs to be SUMmed with a formula like SUM(S2:S21)
Columns (V,W,X,Y,Z,AD,AH,AI,AJ,AK) contain Y/N answers and need to be
counted with a formula like CONCATENATE(COUNTIF(V2:V21,"Y")," /
",COUNTIF(V2:V21,"N"))
The problem I am having, is recreating all of these formulas for each
iteration of the Subtotal. There are 1,000 subtotals, each with
different quantity of rows, so the Range for each subtotal is
different.
How can I recreate these formulas for each Subtotal keeping the
formulas the same for each respective column, but only using the range
for each particular Subtotal?