Hi debi,
I noticed you have a recorded macro, which is a great tool, but often can use some cleanup. I took the liberty of making some changes, in particular removing tasks where a range or cell is selected, and then the code uses "selection." ....
In those cases it is almost always better to work with the range itself. Have a look and see if this produces the desired result?:
Sub Formatting1()
'
' Formatting1 Macro
Dim lr As Long
Application.ScreenUpdating = False
Range("A1, C1").Select
Cells.EntireColumn.AutoFit
With Rows("1:1")
.Font.Bold = True
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Columns("B:C").Delete Shift:=xlToLeft
Range("S1:V1").EntireColumn.Delete
Columns("F:H").NumberFormat = "$#,##0.00"
Columns("P:R").NumberFormat = "$#,##0.00"
lr = Range("A" & Rows.Count).End(xlUp).Row 'finds last row with data in Col A
With Range("" & "F" & lr + 1 & ":H" & lr + 1 & "," & "P" & lr + 1 & ":R" & lr + 1 & "")
.Formula = "=SUM(R[-" & lr - 1 & "]C:R[-1]C)"
'if there are never borders to start, then you can remove all the "... = xlNone" lines below
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
.Borders(xlEdgeLeft).LineStyle = xlNone
.Borders(xlEdgeTop).LineStyle = xlNone
.Borders(xlEdgeTop).ColorIndex = 0
.Borders(xlEdgeTop).LineStyle = xlContinuous
.Borders(xlEdgeTop).TintAndShade = 0
.Borders(xlEdgeTop).Weight = xlThin
End With
Application.ScreenUpdating = False
End Sub
Bookmarks