Sub Macro1()
Dim Counter As Integer, i As Integer, num As Integer
'
For Counter = 2 To 9
Worksheets("a").Cells(1, Counter).Sort _
Key1:=Worksheets("a").Cells(, Counter), _
Header:=xlGuess
i = 2
num = Worksheets("a").Cells(2, 10)
While num < 20
Worksheets("b").Cells(i - 1, Counter - 1) = Worksheets("a").Cells(i, 11)
i = i + 1
num = num + Worksheets("a").Cells(i, 10)
Wend
Next Counter
End Sub