Thanks for your reply, I think this works but due to other issues I can't really tell.
If I remove your suggested code and run the WB protected I am getting errors which I'm thinking if I show where the error are in the code then I could get help for each that arise. Don't want to violate any conduct though!
Sub SortCSV()
' Sorts contents of Report sheet to sheets 1 - 17 dependant on code
Dim Val, i As Long, ws As String
Application.ScreenUpdating = False
With Sheet1
.Range(.Cells(5, 9), .Cells(Rows.Count, 9)).AdvancedFilter xlFilterCopy, , .Range("P1"), True
With .Range("P1").CurrentRegion: Val = .Value: End With
With .Range("A5:L" & .Cells(Rows.Count, "A").End(xlUp).Row)
For i = 2 To UBound(Val)
ws = Val(i, 1)
If Evaluate("ISREF('" & Val(i, 1) & "'!A6)") = False Then Sheets.Add(, Sheets(Sheets.Count)).Name = ws
.AutoFilter 9, Val(i, 1)
.Offset(1).SpecialCells(12).Copy Sheets(ws).Range("A6")
Sheet1.AutoFilterMode = False
Next i
End With
End With
Application.ScreenUpdating = True
MsgBox Application.UserName & ", Your data transfer is completed!", vbExclamation, "Status"
End Sub
Red code is where I'm getting an error on protected sheet
Bookmarks