Hello
I search for solve this problem automaically instead of using manually.
based on the macro will insert three columns for next month with the same formatting and formulas . the problemis not adding formulas for row TTL for columns Arrived & Sales just run the macro you will see the formuals is gone for row TTL for columns Arrived & Sales .
Sub InsertMonth()
Dim rng As Range
Dim oldmth As String, mystr As String
Dim oldm As Integer, newm As Integer
Dim am
am = [{"JANUARY", "FEBRUARY", "MARCH", "APRIL", "MAY", "JUNE", "JULY", "AUGUST", "SEPTEMBER", "OCTOBER", "NOVEMBER", "DECEMBER"}]
Application.ScreenUpdating = False
Application.Calculation = xlManual
With Sheets(1)
oldmth = (.Cells(1, Columns.Count).End(xlToLeft)(1, 1))
oldm = Application.Match(oldmth, am, 0)
newm = Month(DateSerial(Year(Now), oldm + 1, 1))
.Cells(2, Columns.Count).End(xlToLeft)(1, -1).Resize(.[A2].CurrentRegion.Rows.Count - 1, 3).Copy _
Cells(2, Columns.Count).End(xlToLeft)(1, 2)
.Cells(2, Columns.Count).End(xlToLeft)(1, -1).Offset(1).Resize(.[A2].CurrentRegion.Rows.Count, 1).Resize(, 3).ClearContents
If .Cells(1, Columns.Count).End(xlToLeft)(1, 1).Value <> "JANUARY" Then
.Cells(2, Columns.Count).End(xlToLeft)(1, -1).Offset(1, -1).Resize(.[A2].CurrentRegion.Rows.Count, 1).Copy
.Cells(2, Columns.Count).End(xlToLeft)(1, 1).Offset(1).Resize(.[A2].CurrentRegion.Rows.Count, 1).PasteSpecial xlPasteFormulas
End If
.Cells(1, Columns.Count).End(xlToLeft)(1, 1).Offset(, 1).Value = _
Choose(newm, "JANUARY", "FEBRUARY", "MARCH", "APRIL", "MAY", "JUNE", "JULY", "AUGUST", "SEPTEMBER", "OCTOBER", "NOVEMBER", "DECEMBER")
With .Cells(1, Columns.Count).End(xlToLeft)(1, 1).Resize(, 3)
.Merge
.HorizontalAlignment = xlCenter
.Font.ColorIndex = 1
.Interior.ColorIndex = 6
.Font.Size = 12
End With
.Cells(2, Columns.Count).End(xlToLeft)(1, 1).Offset(1).Select
Application.CutCopyMode = False
Application.Calculation = xlCalculationAutomatic
End With
End Sub