Sub test()
Dim h As Integer
Dim i As Integer
Dim j As Integer
Dim k As Integer
Dim rng As Range
Dim partsRng As Range
Dim cell As Range
Dim topmost As Integer
Dim array1()
Dim array2()
Dim array3()
Set partsRng = Range("A1:A100")
topmost = Application.WorksheetFunction.CountIf(partsRng, "=C80001")
If topmost < Application.WorksheetFunction.CountIf(partsRng, "=C80010") Then topmost = Application.WorksheetFunction.CountIf(partsRng, "=C80010")
If topmost < Application.WorksheetFunction.CountIf(partsRng, "=C80100") Then topmost = Application.WorksheetFunction.CountIf(partsRng, "=C80100")
ReDim array1(topmost)
ReDim array2(topmost)
ReDim array3(topmost)
For Each cell In partsRng
If cell.Value = "C80001" Or cell.Value = "C80010" Or cell.Value = "C80100" Then
Set rng = Range("A" & cell.Row & ":" & "G" & cell.Row)
If cell.Value = "C80001" Then
array1(h) = rng
h = h + 1
ElseIf cell.Value = "C80010" Then
array2(i) = rng
i = i + 1
ElseIf cell.Value = "C80100" Then
array3(j) = rng
j = j + 1
End If
End If
Next cell
For k = 0 To topmost
Sheets("Sheet2").Range("A1:G1").Offset(k, 0) = array1(k)
Sheets("Sheet2").Range("H1:N1").Offset(k, 0) = array2(k)
Sheets("Sheet2").Range("O1:U1").Offset(k, 0) = array3(k)
Next