Absolutely simple.
first you need to define some variables,
Dim wsS3 As Worksheet, wsS4 As Worksheet,.....Dim wsSn As Worksheet
then you need to add the same number of counters,
Dim x As Long, y As Long, ....n As Long
then you need to get the last row variables for each sheet, and clean the respective areas
Dim LR3 As Long, LR4 As Long, ...LRn As Long
...
With wsSn
LRn = .Cells(.Rows.Count, 2).End(xlUp).Row
.Range(.Cells(7, 1), .Cells(LRn, 8)).ClearContents
End With
Then inside the loop For i = 7......Next i, put as many Elseif's as needed
ElseIf wsC.Cells(i, 8).Value = n Then
wsSn.Range(wsSn.Cells(k, 2), wsSn.Cells(k, 8)).Value = wsC.Range(wsC.Cells(i, 2), wsC.Cells(i, 8)).Value
n = n + 1
And that's it
remember to change the " n " with the appropriate number in each case
you can come back if you find any problem.
good luck
Bookmarks