I have VBA code creating X number of weeks in columns. Each week consists of M-F(Columns 1-5), and then a total of that weeks numbers(Column 6). And then say X = 2, I would have a 'Grand Total' in Column 13. Column 6 and 12 have totals from M-F(got that formula from Selection.FormulaR1C1 = "=SUM(R[0]C[-1]:R[0]C[-5]"), but then I need a formula to put in Column 13. The formula for X = 2 would be this, "=SUM(R[0]C[-1],R[0]C[-7])". How would I write the formula so that it will change with X. (ex. X=3, "=SUM(R[0]C[-1],R[0]C[-7],R[0]C[-13])" )
Any and all help is appreciated!