I have several columns of figures with totals at the bottom. The leftmost
column is the grand total. I need to calculate what percentages the subtotals
are of the grand total.
This code sums the column, and works fine:
Dim per1 As String
per1 = "=sum(" & r3 & ":" & r4 & ")"
ActiveCell.formula = per1

This code 'should' calculate the percentage, but the debugger sticks on the
final line:
Dim per2 As String
per2 = "=sum(" & r3 & ":" & r4 & ")/(=sum(" & r1 & ":" & r2 & ")/100)"
ActiveCell.formula = per2

What have I done?