THIS CODE WORKS BETTER
Sub CAPITALISATION():
Dim Lst As Long, n As Long
'Application.ScreenUpdating = False
Sheets("CAPITALISATION").Cells(1).CurrentRegion.Offset(1).ClearContents
'the current region only works if the columns and rows next to it are blank
With Sheets("SITE_ASSUMPTIONS").Range("p9").CurrentRegion
.Parent.AutoFilterMode = False
' colum to filter is 4
'7 is part of the formula is always 7
.AutoFilter 4, Array("Renovation", "New sites"), 7
.Copy Sheets("CAPITALISATION").Cells(1)
.AutoFilter
End With
With Sheets("CAPITALISATION")
Lst = .Range("A" & Rows.Count).End(xlUp).Row
For n = Lst To 2 Step -1
With .Range("F" & n)
.EntireRow.Copy
.Offset(1).EntireRow.Insert
.Resize(2).Value = Application.Transpose(Array("Engineers", "Site finders"))
End With
Next n
End With
End Sub
Bookmarks