Use this code basically it use the Autofilter technique to create sheets and use of collection class to remove the duplicates.
Sub Macro60() 'Step 1: Declare your Variables Dim MySheet As Worksheet Dim MyRange As Range Dim UList As Collection Dim UListValue As Variant Dim i As Long 'Step 2: Set the Sheet that contains the AutoFilter Set MySheet = ActiveSheet 'Step 3: If the sheet is not auto-filtered, then exit If MySheet.AutoFilterMode = False Then Exit Sub End If 'Step 4: Specify the Column # that holds the data you want filtered Set MyRange = Range(MySheet.AutoFilter.Range.Columns(1).Address) 'Step 5: Create a new Collection Object Set UList = New Collection 'Step 6: Fill the Collection Object with Unique Values On Error Resume Next For i = 2 To MyRange.Rows.Count UList.Add MyRange.Cells(i, 1), CStr(MyRange.Cells(i, 1)) Next i On Error GoTo 0 'Step 7: Start looping in through the collection Values For Each UListValue In UList 'Step 8: Delete any Sheets that may have bee previously created On Error Resume Next Application.DisplayAlerts = False Sheets(CStr(UListValue)).Delete Application.DisplayAlerts = True On Error GoTo 0 'Step 9: Filter the Autofilter to macth the current Value MyRange.AutoFilter Field:=1, Criteria1:=UListValue 'Step 10: Copy the AutoFiltered Range to new Workbook MySheet.AutoFilter.Range.Copy Worksheets.Add.Paste ActiveSheet.Name = Left(UListValue, 30) Cells.EntireColumn.AutoFit 'Step 11: Loop back to get the next collection Value Next UListValue 'Step 12: Go back to main Sheet and removed filters MySheet.AutoFilter.ShowAllData MySheet.Select End Sub On Monday, May 18, 2015 at 2:44:31 PM UTC+5:30, Nasir Saikh wrote: > > Thanks dude > > but I need code to make separate sheet for each LOB as these needs to > assign work to each individual. > > > On Monday, May 18, 2015 at 1:42:30 PM UTC+5:30, Nasir Saikh wrote: > >> Hi Experts, >> >> I want to split table from main table with their names available in column >> >> For example. >> >> I have a database in the database name available A,B,C,D,E only then the >> data for each should be make separate. >> >> Thanks in advance. >> >> Regards >> Nasir Shaikh >> > -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/d/optout.