Steve Belsch
02-05-2020, 09:39 AM
Hi VBA experts,
I have VBA code uses For iCol, Next iCol to sum totals across 73 columns. Here is the code:
i = 3
J = i
Range("A" & (i + 6)) = "Subtotal " & Range("A" & (i + 6)).Value
For iCol = 13 To 73 'Sets which columns to Subtotal
Range(Cells(i + 6, 13), Cells(i + 6, 73)).FormulaR1C1 = "=SUBTOTAL(9,R" & J & "C:R[-1]C)"
Next iCol
Is there a more efficient way to do this calculation across 73 columns?
Thanks for any ideas.
Steve
I have VBA code uses For iCol, Next iCol to sum totals across 73 columns. Here is the code:
i = 3
J = i
Range("A" & (i + 6)) = "Subtotal " & Range("A" & (i + 6)).Value
For iCol = 13 To 73 'Sets which columns to Subtotal
Range(Cells(i + 6, 13), Cells(i + 6, 73)).FormulaR1C1 = "=SUBTOTAL(9,R" & J & "C:R[-1]C)"
Next iCol
Is there a more efficient way to do this calculation across 73 columns?
Thanks for any ideas.
Steve