Hi, the code below find the last 3 columns before last 3, copies them, inserts them as formulas and the pasting the copied columns as values. It works properly, but it doesn't copy the format as it should. Basically, it copies over only the format of the last column, not all 3(they are different).
Any idea on an easy fix?
Any idea on an easy fix?
VBA Code:
Sub ColChange()
Dim lastCol As Long
Application.Calculation = xlManual
With Sheets("2020")
lastCol = Cells(8, Columns.Count).End(xlToLeft).Column
Cells(8, lastCol - 3).Resize(, 3).EntireColumn.Insert
Cells(8, lastCol - 6).Resize(, 3).EntireColumn.Copy
Cells(1, lastCol - 3).Resize(, 3).PasteSpecial Paste:=xlPasteFormulas
Cells(1, lastCol - 3).Resize(, 3).PasteSpecial Paste:=xlPasteFormats
Cells(1, lastCol - 6).PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
End With
Application.Calculation = Automatic
End Sub