I am trying to insert formulas into an excel sheet with VBA but formula insert only one sheet
Sub RunSheets1()
Sheets("Sheet1").Activate
With ThisWorkSheet
Range("B5").Formula = "=SUM(F3,G3,H3,I3,J3)"
End With
Sheets("Sheet2").Activate
With ThisWorkSheet
Range("H6").Formula = "=SUM(F4,G4,H4,I4,J4)"
Range("AC6").Formula = "=SUM(AC4,AD4,AE4,AF4,AG4)"
End With
Sheets("Sheet3").Activate
With ThisWorkSheet
Range("H6").Formula = "=SUM(F4,G4,H4,I4,J4)"
Range("AC6").Formula = "=SUM(AC4,AD4,AE4,AF4,AG4)"
End With
Sheets("Sheet4").Activate
With ThisWorkSheet
Range("H6").Formula = "=SUM(F4,G4,H4,I4,J4)"
Range("AC6").Formula = "=SUM(AC4,AD4,AE4,AF4,AG4)"
End With
Sheets("Sheet5").Activate
With ThisWorkSheet
Range("H6").Formula = "=SUM(F4,G4,H4,I4,J4)"
Range("AC6").Formula = "=SUM(AC4,AD4,AE4,AF4,AG4)"
End With
End Su