I have a series of 12 sheets each named as a month
I wish to find the cumulative value of a cell in each month
So the January sheet would have a value .Range("AP9").Value
the February Sheet would have a value January!AP9 + February!AP9
March January!Ap9 + February!AP9 + March!AP9 and so on
I triedto achieve this with the following code
But this does nor work, the initial = sign causes an error, but without the sign all I have is a string not a formulaSub updatesummary() Dim ws as workSheet Sformula = "" For Each ws In ActiveWorkbook.Worksheets With Sheets(ws.Name) If ws.Name <> "Template" Then If ws.Name <> "Names" Then If Left(ws.Name, 3) <> "SUM" Then Sformula = Sformula & ws.Name & "!" & .Range("AP9").Address & " +" Sformula = "= " & Left(Sformula, Len(Sformula) - 2) .Range("AQ9").FormulaR1C1 = Sformula Sformula = Sformula & "+" Sformula = Right(Sformula, Len(Sformula) - 3) .Range("AQ9").Copy .Range("AQ10:AQ57").PasteSpecial Paste:=xlPasteFormulas Range("AQ9:AQ57").Copy Range("AQ9:AQ57").PasteSpecial Paste:=xlPasteValues Application.CutCopyMode = False End If End If End If End With Next End Sub
I need some help please
LoftySuth
Bookmarks