Dim i As Integer, current As Integer, ws As Worksheet
Set ws = ThisWorkbook.Worksheets("工作表1")
i = 2
current = 0
While ws.Cells(i, 1) <> ""
ws.Range(Cells(current + 1, 4), Cells(current + ws.Cells(i, 2).Value, 4)) = ws.Cells(i, 1).Value
current = current + ws.Cells(i, 2).Value
i = i + 1
Wend