Hi, mahaveersomani,
your code should fail in the sample file at Row1 as the entry there is Emplyee ID 111011 - your code assumes Employee ID 111011.
Sub SplitData_Mod()
Dim lngRC As Long
lngRC = 1
With Sheets("Sheet1")
Do While .Cells(lngRC, "A").Value <> ""
If Not Evaluate("ISREF('" & .Cells(lngRC, "A").Value & "'!A1)") Then
Sheets.Add after:=Worksheets(Sheets.Count)
ActiveSheet.Name = .Cells(lngRC, "A").Value
.Cells(lngRC, "A").CurrentRegion.Copy ActiveSheet.Range("A1")
ActiveSheet.Cells.EntireColumn.AutoFit
End If
lngRC = .Cells(lngRC, "A").End(xlDown).Row + 2
Loop
End With
End Sub
Ciao,
Holger
Bookmarks