Sub DistributeRows()
' hiker95, 07/19/2014, ME792724
Dim w1 As Worksheet, w As String
Dim oa As Variant
Dim r As Long, lr As Long, lc As Long, n As Long, nr As Long, lr2 As Long
Application.ScreenUpdating = False
Set w1 = Sheets("Sheet1")
With w1
lr = .Cells(Rows.Count, 1).End(xlUp).Row
lc = .Cells(1, Columns.Count).End(xlToLeft).Column
oa = .Range(.Cells(1, 1), .Cells(lr, lc))
.Range(.Cells(2, 1), .Cells(lr, lc)).Sort key1:=.Range("B2"), order1:=1
For r = 2 To lr
n = Application.CountIf(.Columns(2), .Cells(r, 2).Value)
w = .Cells(r, 2)
If Not Evaluate("ISREF('" & Trim(w) & "'!A1)") Then Worksheets.Add(After:=Sheets(Sheets.Count)).Name = Trim(w)
With Sheets(w)
With .Cells(1, 1).Resize(, lc)
.Value = w1.Cells(1, 1).Resize(, lc).Value
.HorizontalAlignment = xlCenter
.Font.Bold = True
End With
lr2 = Sheets(w).Cells(Rows.Count, 1).End(xlUp).Row
If lr2 > 2 Then Sheets(w).Range(.Cells(2, 1).Cells(lr2, lc)).ClearContents
nr = .Cells(.Rows.Count, "A").End(xlUp).Row + 1
.Cells(nr, 1).Resize(n, lc).Value = w1.Cells(r, 1).Resize(n, lc).Value
.Columns.AutoFit
End With
r = r + n - 1
Next r
.Range(.Cells(1, 1), .Cells(lr, lc)) = oa
.Activate
End With
Application.ScreenUpdating = True
End Sub