Sub Summary()
Dim ws As Worksheet
Dim DestSheet As Worksheet
Dim j As Long 'row index on destination sheet
Dim sRow As Long 'row index on source worksheet
Dim nRow As Long 'last row index on source worksheet
ActiveSheet.Unprotect
Application.ScreenUpdating = False
Set DestSheet = Worksheets("Summary")
j = 9
For Each ws In ActiveWorkbook.Worksheets
Select Case UCase(ws.Name)
Case "TEMPLATE", "DROPDOWN" 'Ignore these worksheets (list in all caps!)
Case Else 'Copy data from all the rest
nRow = ws.Cells(ws.Rows.Count, "U").End(xlUp).Row
ws.Cells(6, 2).Copy
DestSheet.Cells(j, 2).PasteSpecial xlPasteValues 'Store Name
ws.Cells(7, 2).Copy
DestSheet.Cells(j, 3).PasteSpecial xlPasteValues 'Store Number
ws.Cells(6, 9).Copy
DestSheet.Cells(j, 4).PasteSpecial xlPasteValues 'Square Footage
ws.Cells(13, 16).Copy
DestSheet.Cells(j, 6).PasteSpecial xlPasteValues 'Professional Fees
ws.Cells(14, 16).Copy
DestSheet.Cells(j, 7).PasteSpecial xlPasteValues 'Parts
ws.Cells(15, 16).Copy
DestSheet.Cells(j, 8).PasteSpecial xlPasteValues 'Freight
ws.Cells(16, 16).Copy
DestSheet.Cells(j, 9).PasteSpecial xlPasteValues 'Contract
ws.Cells(17, 16).Copy
DestSheet.Cells(j, 10).PasteSpecial xlPasteValues 'Other Cost
ws.Cells(18, 16).Copy
DestSheet.Cells(j, 11).PasteSpecial xlPasteValues 'Contingency
ws.Cells(22, 5).Copy
DestSheet.Cells(j, 15).PasteSpecial xlPasteValues 'Base $Variance
ws.Cells(22, 7).Copy
DestSheet.Cells(j, 16).PasteSpecial xlPasteValues 'Base SF Variance
ws.Cells(22, 9).Copy
DestSheet.Cells(j, 17).PasteSpecial xlPasteValues 'Base %Variance
ws.Cells(23, 5).Copy
DestSheet.Cells(j, 18).PasteSpecial xlPasteValues 'SD $Variance
ws.Cells(23, 7).Copy
DestSheet.Cells(j, 19).PasteSpecial xlPasteValues 'SD SF Variance
ws.Cells(23, 9).Copy
DestSheet.Cells(j, 20).PasteSpecial xlPasteValues 'SD %Variance
ws.Cells(24, 5).Copy
DestSheet.Cells(j, 21).PasteSpecial xlPasteValues 'DD $Variance
ws.Cells(24, 7).Copy
DestSheet.Cells(j, 22).PasteSpecial xlPasteValues 'DD SF Variance
ws.Cells(24, 9).Copy
DestSheet.Cells(j, 23).PasteSpecial xlPasteValues 'DD %Variance
ws.Cells(25, 5).Copy
DestSheet.Cells(j, 24).PasteSpecial xlPasteValues 'FC $Variance
ws.Cells(25, 7).Copy
DestSheet.Cells(j, 25).PasteSpecial xlPasteValues 'FC SF Variance
ws.Cells(25, 9).Copy
DestSheet.Cells(j, 26).PasteSpecial xlPasteValues 'FC %Variance
ws.Cells(19, 11).Copy
DestSheet.Cells(j, 27).PasteSpecial xlPasteValues 'Incremental Total
j = j + 1
If j > 22 Then
Rows(j + 1).Insert
Rows(j).Copy
Rows(j + 1).PasteSpecial Paste:=xlPasteFormats
End If
End Select
Next
Range("SumTC").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
End With
With Selection.Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark1
.TintAndShade = -4.99893185216834E-02
.PatternTintAndShade = 0
End With
Range("SumCtr").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
End With
Range("SumFeesFmt").Select
Selection.NumberFormat = "$#,##0_);[Red]($#,##0)"
ActiveSheet.Protect
End Sub
Bookmarks