Dim Lr As Long
Dim ws As Worksheet
Set ws = Sheets("NewData")
Application.ScreenUpdating = False
Dim ShtName As String
ShtName = "NewData"
Sheets(ShtName).Activate
Columns("A:A").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("A1").Select
ActiveCell.FormulaR1C1 = "F.Type"
Cells.Select
With Selection.Font
.Name = "Calibri"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ThemeColor = xlThemeColorLight1
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
With Selection.Font
.Name = "Calibri"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ThemeColor = xlThemeColorLight1
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
Cells.EntireColumn.AutoFit
Rows("1:1").Select
Selection.Font.Bold = True
Selection.Font.Italic = True
Selection.AutoFilter
Columns("H:H").Select
Selection.NumberFormat = "dd/mm/yyyy;@"
Columns("N:N").Select
Selection.NumberFormat = "0%"
Columns("O:O").Select
Selection.Style = "Comma"
Columns("P:P").Select
Selection.Style = "Comma"
Range("Q1").Select
ActiveCell.FormulaR1C1 = "T.Type"
Range("R1").Select
ActiveCell.FormulaR1C1 = "Jnl"
Range("R2").Select
ActiveSheet.Range("$A$1:$Q$2644").AutoFilter Field:=12, Criteria1:= _
"Total Spend"
Rows("2469:2644").Select
Range("I2469").Activate
Selection.Delete Shift:=xlUp
ActiveSheet.Range("$A$1:$Q$2642").AutoFilter Field:=12
Range("L1").Select
Cells.Find(What:="LGRP %", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
Range("A2469").Select
ActiveCell.FormulaR1C1 = "LGRP"
Range("A2469").Select
Selection.Copy
Range("B2470").Select
Range(Selection, Selection.End(xlDown)).Select
Range("A2470:B2642").Select
Range("B2470").Activate
Selection.SpecialCells(xlCellTypeBlanks).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("A2469").Select
Range("A1").Select
ActiveSheet.Range("$A$1:$Q$2642").AutoFilter Field:=2, Criteria1:= _
"Client Code"
Rows("2469:2469").Select
Selection.Delete Shift:=xlUp
ActiveSheet.Range("$A$1:$Q$2641").AutoFilter Field:=2
Range("A2").Select
ActiveCell.FormulaR1C1 = "ESPO"
Range("A2").Select
Selection.Copy
Range("A3").Select
Range(Selection, Selection.End(xlDown)).Select
Range("A3:A2468").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("A1").Select
Selection.End(xlToRight).Select
Range("Q2").Select
ActiveCell.FormulaR1C1 = "ACR"
Range("R2").Select
ActiveCell.FormulaR1C1 = "Y"
Range("Q2:R2").Select
Selection.Copy
Range("P3").Select
Range(Selection, Selection.End(xlDown)).Select
Range("P3:R2641").Select
Selection.SpecialCells(xlCellTypeBlanks).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("Q2").Select
Lr = Range("B" & Rows.Count).End(xlUp).Row
Range("S1").Value = "Itm Code"
Range("S2").Value = "SLMANFEE"
Range("B1:R" & Lr).AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("S1:S2"), CopyToRange:=Range("B" & Lr + 1), Unique:=False
Range("A1").Select
Selection.End(xlDown).Select
Selection.End(xlToRight).Select
ActiveWindow.SmallScroll Down:=9
Range("O2643").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Range("P2643").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("O2643").Select
ActiveCell.FormulaR1C1 = _
"=IF(LEFT(RC[-13],3)=""CBC"",(RC[1]/0.02),(RC[1]/0.01))"
Range("O2643").Select
Selection.Copy
Range("O2644").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.PasteSpecial Paste:=xlPasteFormulas, operation:=xlNone, _
skipblanks:=False, Transpose:=False
Range("O2643").Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, operation:=xlNone, skipblanks _
:=False, Transpose:=False
Range("A2643").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "WMC"
Range("A2643").Select
Selection.Copy
Range("B2644").Select
Range(Selection, Selection.End(xlDown)).Select
Range("A2644:B2812").Select
Range("B2644").Activate
Selection.SpecialCells(xlCellTypeBlanks).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("A1").Select
ActiveSheet.Range("$A$1:$S$2812").AutoFilter Field:=1, Criteria1:="="
Rows("2642:2642").Select
Selection.Delete Shift:=xlUp
ActiveSheet.Range("$A$1:$S$2811").AutoFilter Field:=1
Columns("K:K").Select
Selection.Delete Shift:=xlToLeft
Range("K1").Select
Selection.End(xlToRight).Select
Range("R1:R2").Select
Selection.ClearContents
Range("R2").Select
ActiveCell.FormulaR1C1 = "=""0""&RC[-13]"
Range("R2").Select
Selection.Copy
Range("Q3").Select
Range(Selection, Selection.End(xlDown)).Select
Range("Q3:R2811").Select
Selection.SpecialCells(xlCellTypeBlanks).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("R2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, operation:=xlNone, skipblanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Range("E2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.PasteSpecial Paste:=xlPasteValues, operation:=xlNone, skipblanks _
:=False, Transpose:=False
Range("E2").Select
Selection.End(xlToRight).Select
Columns("R:R").Select
Selection.Delete Shift:=xlToLeft
Range("O1").Select
ActiveCell.FormulaR1C1 = "Man Fee Value"
Range("O2").Select
Range("A1").Select
Sheets("INPUTS").Select
Range("G13").Select
With Worksheets("INPUTS").Range("G13")
.Font.Name = "Wingdings2"
.Font.Size = "20"
.Font.Bold = True
.HorizontalAlignment = xlHAlignCenter
.Value = Chr(82)
.Parent.Select
End With
End Sub