I have some data, and the VBA code says that all the rows should be split between the sheets, but one row is still present.
Dim mycell As Range
Dim myrange As Range
Worksheets("sheet2").Range("a1:z10000").Clear
Worksheets("sheet3").Range("a1:z10000").Clear
Worksheets("sheet4").Range("a1:z10000").Clear
Worksheets("sheet5").Range("a1:z10000").Clear
Set myrange = Worksheets("sheet1").Range("a3:a916")
For Each mycell In myrange
If mycell.Value >= 12 Then
If mycell.Value >= 24 Then
mycell.Interior.ColorIndex = 4
mycell.Resize(1, 16).Cut Destination:= _
Worksheets("sheet2").Range("a1").Offset(Worksheets("sheet2").Rows.Count - 1, 0).End(xlUp).Offset(1, 0)
Else
mycell.Interior.ColorIndex = 5
mycell.Resize(1, 16).Cut Destination:= _
Worksheets("sheet3").Range("a1").Offset(Worksheets("sheet3").Rows.Count - 1, 0).End(xlUp).Offset(1, 0)
End If
Else
mycell.Interior.ColorIndex = 6
mycell.Resize(1, 16).Cut Destination:= _
Worksheets("sheet4").Range("a1").Offset(Worksheets("sheet4").Rows.Count - 1, 0).End(xlUp).Offset(1, 0)
End If
Next
Worksheets("sheet2").Columns.AutoFit
Worksheets("sheet3").Columns.AutoFit
Worksheets("sheet4").Columns.AutoFit
End Sub ```