This is the underlying code.
As you can see it's in two stages, separating the paste special in Step2 and formatting. Running as one outputs blanks. In Step1 when it stops the data updates
Sub Step1()
Application.ScreenUpdating = False
Cells.Select
Range("G20").Activate
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Columns("F:F").Select
Selection.Replace What:=" ", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
'Dim Val As Variant
'Val = Application.InputBox("Please enter month end date", , "i.e. 28 Feb 2009")
'Range("A4").Value = Val
Columns("H:H").Select
Selection.Insert Shift:=xlToRight
Range("H7").Select
ActiveCell.Value = "'equity"
Dim rngData As Range, rngFormula As Range
With ThisWorkbook.Worksheets("Sheet1")
Set rngData = .Range("G1:G" & .Cells(.Rows.Count, "G").End(xlUp).Row)
Set rngFormula = .Range("H7")
rngFormula.AutoFill _
Destination:=.Range(rngFormula, _
.Cells(rngData.Rows(rngData.Rows.Count).Row, rngFormula.Column))
End With
Columns("I:I").Select
Selection.Insert Shift:=xlToRight
Range("I7").Select
ActiveCell.FormulaR1C1 = "=CONCATENATE(RC[-2],"" "",RC[-1],"" "",""sedol1"")"
With ThisWorkbook.Worksheets("Sheet1")
Set rngData = .Range("G1:G" & .Cells(.Rows.Count, "G").End(xlUp).Row)
Set rngFormula = .Range("I7")
rngFormula.AutoFill _
Destination:=.Range(rngFormula, _
.Cells(rngData.Rows(rngData.Rows.Count).Row, rngFormula.Column))
End With
Columns("J:J").Select
Selection.Insert Shift:=xlToRight
Range("J6").Value = "ID_ISIN"
Range("J7").Select
ActiveCell.FormulaR1C1 = "=BDP(RC[-1],R6C10)"
With ThisWorkbook.Worksheets("Sheet1")
Set rngData = .Range("G1:G" & .Cells(.Rows.Count, "G").End(xlUp).Row)
Set rngFormula = .Range("J7")
rngFormula.AutoFill _
Destination:=.Range(rngFormula, _
.Cells(rngData.Rows(rngData.Rows.Count).Row, rngFormula.Column))
End With
Columns("K:K").Select
Selection.Insert Shift:=xlToRight
Range("K6").Value = "TICKER_AND_EXCH_CODE"
Range("K7").Select
ActiveCell.FormulaR1C1 = "=BDP(RC[-2],R6C11)"
With ThisWorkbook.Worksheets("Sheet1")
Set rngData = .Range("G1:G" & .Cells(.Rows.Count, "G").End(xlUp).Row)
Set rngFormula = .Range("K7")
rngFormula.AutoFill _
Destination:=.Range(rngFormula, _
.Cells(rngData.Rows(rngData.Rows.Count).Row, rngFormula.Column))
End With
MsgBox ("Complete, please run Step2 macro")
''
''
Application.ScreenUpdating = False
End Sub
Sub Step2()
'Final format
Application.ScreenUpdating = False
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Columns("O:S").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlToLeft
Columns("P:AO").Select
Selection.Delete Shift:=xlToLeft
Cells.Select
Range("H8").Activate
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
With Selection.Interior
.ColorIndex = 2
.Pattern = xlSolid
End With
Columns("A:E").Select
Selection.EntireColumn.Hidden = False
Columns("B:D").Select
Selection.Delete Shift:=xlToLeft
Range("D10").Select
'
'
'
' Columns("G:G").Select
' Selection.Copy
' Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Cells.Replace What:="#N/A Invalid Security", Replacement:="", LookAt:= _
xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Columns("B:G").Select
Columns("B:G").EntireColumn.AutoFit
Columns("G:K").Select
Range("I1").Activate
Selection.EntireColumn.Hidden = False
Columns("J").Select
Selection.Delete Shift:=xlToLeft
Columns("G:H").Select
Selection.Font.Bold = False
Range("G6:H6").Select
Selection.Font.Bold = True
Columns("E:F").Select
Selection.Delete Shift:=xlToLeft
Range("E6").Select
ActiveCell.FormulaR1C1 = "ISIN"
Range("F6").Select
ActiveCell.FormulaR1C1 = "Ticker"
Columns("C:C").Select
Selection.Delete Shift:=xlToLeft
Columns("E:E").EntireColumn.AutoFit
Range("A2").Select
Cells.Replace What:="accrued income", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Cells.Replace What:="total for: equities", Replacement:="", LookAt:= _
xlWhole, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Cells.Replace What:="Total: ", Replacement:="", LookAt:=xlWhole, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Columns("A:A").ColumnWidth = 33
Application.ScreenUpdating = True
MsgBox ("Completed, please check a few...
")
End Sub