Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub Variance()
- '
- ' Variance Macro
- '
- '
- ActiveSheet.Shapes.Range(Array("Picture -767")).Select
- Selection.Delete
- Cells.Select
- Selection.UnMerge
- Selection.RowHeight = 15
- Selection.ColumnWidth = 12
- Selection.Columns.AutoFit
- Rows("1:23").Select
- Selection.Delete Shift:=xlUp
- Range("J1").Select
- Selection.Cut
- Range("K1").Select
- ActiveSheet.Paste
- ActiveWindow.ScrollColumn = 2
- ActiveWindow.ScrollColumn = 3
- ActiveWindow.ScrollColumn = 4
- ActiveWindow.ScrollColumn = 5
- ActiveWindow.ScrollColumn = 6
- Range("Q1:S1").Select
- Selection.Cut
- Range("P1").Select
- ActiveSheet.Paste
- ActiveWindow.ScrollColumn = 7
- ActiveWindow.ScrollColumn = 8
- ActiveWindow.ScrollColumn = 9
- Range("W1:Z1").Select
- Selection.Cut
- Range("U1").Select
- ActiveSheet.Paste
- Range("V8").Select
- ActiveWindow.ScrollColumn = 8
- ActiveWindow.ScrollColumn = 7
- ActiveWindow.ScrollColumn = 6
- ActiveWindow.ScrollColumn = 5
- ActiveWindow.ScrollColumn = 3
- ActiveWindow.ScrollColumn = 2
- ActiveWindow.ScrollColumn = 1
- Cells.Select
- Selection.Columns.AutoFit
- Range("A:A,C:C,D:D,F:J,M:M,Q:Q").Select
- Range("Q1").Activate
- Selection.Delete Shift:=xlToLeft
- Range("I:J,L:M").Select
- Range("L1").Activate
- Selection.Delete Shift:=xlToLeft
- Cells.Select
- With Selection.Font
- .Name = "Calibri"
- .Size = 10
- .Strikethrough = False
- .Superscript = False
- .Subscript = False
- .OutlineFont = False
- .Shadow = False
- .Underline = xlUnderlineStyleNone
- .TintAndShade = 0
- .ThemeFont = xlThemeFontMinor
- End With
- With Selection.Font
- .Name = "Calibri"
- .Size = 11
- .Strikethrough = False
- .Superscript = False
- .Subscript = False
- .OutlineFont = False
- .Shadow = False
- .Underline = xlUnderlineStyleNone
- .TintAndShade = 0
- .ThemeFont = xlThemeFontMinor
- End With
- With Selection.Font
- .ColorIndex = xlAutomatic
- .TintAndShade = 0
- End With
- Selection.Borders(xlDiagonalDown).LineStyle = xlNone
- Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- Selection.Borders(xlEdgeLeft).LineStyle = xlNone
- Selection.Borders(xlEdgeTop).LineStyle = xlNone
- Selection.Borders(xlEdgeBottom).LineStyle = xlNone
- Selection.Borders(xlEdgeRight).LineStyle = xlNone
- Selection.Borders(xlInsideVertical).LineStyle = xlNone
- Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
- Rows("2:2").Select
- Selection.Delete Shift:=xlUp
- Range("A1").Select
- Range(Selection, Selection.End(xlDown)).Select
- numRows = Selection.Rows.Count
- Rows(numRows + 1 & ":" & numRows + 1).Select
- Selection.Delete Shift:=xlUp
- Range("K" & numRows + 4).Select
- Selection.Delete Shift:=xlUp
- Range("A1:J1,A" & numRows + 1 & ":J" & numRows + 1).Select
- With Selection.Interior
- .Pattern = xlSolid
- .PatternColorIndex = xlAutomatic
- .ThemeColor = xlThemeColorDark1
- .TintAndShade = -0.249977111117893
- .PatternTintAndShade = 0
- End With
- With Selection.Font
- .ThemeColor = xlThemeColorLight1
- .TintAndShade = 0
- End With
- Selection.Font.Bold = True
- Range("F" & numRows + 1).Cut Range("E" & numRows + 1)
- Range("A1:J" & numRows + 1).Select
- Selection.Borders.LineStyle = xlContinuous
- Range("A1:J" & numRows).Select
- ActiveSheet.ListObjects.Add(xlSrcRange, Range("$A$1:$J$" & numRows), , xlYes).Name = "Table1"
- ActiveSheet.ListObjects("Table1").TableStyle = "TableStyleLight8"
- Columns("C:H").Select
- Selection.NumberFormat = "0.00"
- Columns("F:F").Select
- Selection.Delete
- ActiveWindow.DisplayGridlines = True
- Range("A2").Select
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement