Hello everyone,

Every morning I run a macro which inserts a new worksheet into a workbook. The macro works great however now I would like to add code to insert the following formula into cell G1 of last worksheet:

=[value of cell G1 in the 2nd to last worksheet of the workbook]+sum(F3:F65000 of the last worksheet in the workbook)

Below is what I have so far but it's not working....


SheetsNo = ActiveWorkbook.Sheets.Count
Sheets(SheetsNo).Select
Range("G1").Select
ActiveCell.FormulaR1C1 = "=Sheets(ActiveWorkbook.Sheets.Count - 1)!RC+SUM(R[-1]C[-1]:R[999]C[-1])"
I've tried a few different combination and still no luck. Suggestions?

Thanks!

Nick