thedeadzeds
Active Member
- Joined
- Aug 16, 2011
- Messages
- 451
- Office Version
- 365
- Platform
- Windows
Guys, how do i change the below to paste as values only?
Code:
Sub Bethan_New_Calls_Service_and_MOT() Dim sh1 As Worksheet, sh2 As Worksheet
Dim i As Long, j As Long
Set sh1 = Sheets("Audi Service & MOT New Calls")
Set sh2 = Sheets("All Data")
'Filter New Call
Sheets("Audi Service & MOT New Calls").Select
ActiveSheet.ListObjects("Audi_New_SANDM").Range.AutoFilter Field:=4, _
Criteria1:="New Calls"
'Filter the relevant Contcode
ActiveSheet.ListObjects("Audi_New_SANDM").Range.AutoFilter Field:=13, _
Criteria1:=Array("Kerridge Service", "Kerridge Service & MOT", "Polk Service", _
"Polk Service & MOT"), Operator:=xlFilterValues
'Filter by person
ActiveSheet.ListObjects("Audi_New_SANDM").Range.AutoFilter Field:=16, _
Criteria1:="Bethan M"
i = 1
For j = 1 To Rows.Count
If sh1.Cells(j, 1).EntireRow.Hidden = False Then
sh1.Cells(j, 1).EntireRow.Copy sh2.Cells(i, 1)
i = i + 1
If i = Range("Allocate!e3").Value + 2 Then Exit Sub
End If
Next j
End Sub