Private Sub Worksheet_Activate()
Application.ScreenUpdating = False
nb = Range("N99").CurrentRegion.Rows.Count - 1
Range("N100").Resize(nb, 8).ClearContents
i = 2
While Range("L" & i) <> ""
x = Range("M" & i).Value
l = Cells(Rows.Count, 13 + x).End(xlUp).Row + 1
Range("L" & i).Copy
Cells(l, 13 + x).PasteSpecial xlPasteAll
Application.CutCopyMode = xlCopy
i = i + 1
Wend
End Sub