Hi Hui/Narayan,
I got the macro from the above link.
I need following updation in that macro.
1. Output should come in the new sheet instead on new Book.
Sub breakMyList()
' This macro takes values in the range myList
' and breaks it in to multiple lists
' and saves them to separate files.
Dim cell As Range
Dim curPath As String
curPath = ActiveWorkbook.Path & ""
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each cell In Range("lstSalesman")
[valSalesman] = cell.Value
On Error Resume Next
Range("myList").AdvancedFilter Action:=xlFilterCopy, _
criteriarange:=Range("Criteria"), copyToRange:=Range("Extract"), unique:=False
Range(Range("Extract"), Range("Extract").End(xlDown)).Copy
Workbooks.Add
ActiveSheet.Paste
ActiveWorkbook.SaveAs Filename:=curPath & cell.Value & Format(Now, "dmmmyyyy-hhmmss") & ".xlsx", _
FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
ActiveWindow.Close
Range(Range("Extract"), Range("Extract").End(xlDown)).ClearContents
Next cell
Application.ScreenUpdating = True
Application.DisplayAlerts = True
End Sub
Could you update accordingly? as i am not conversant with VBA.
Regards,
Pragnesh