@温柔小兔小兔难道你不知道我现在在闭关修炼VBA么?


Sub text()
Dim i As Integer, x As Integer, y As Integer, z As Integer
For i = 2 To 100
x = Range("b" & i).Value
y = Range("c65536").End(xlUp).Row + 1
z = Int(x / 5)
If z > 0 Then
Range(Cells(y, 3), Cells(y + z - 1, 8)).Select
Selection.Value = Range("a" & i).Value
End If
y = Range("c65536").End(xlUp).Row + 1
Range(Cells(y, 3), Cells(y, 2 + x - 5 * z)).Select
Selection.Value = Range("a" & i).Value
Next
End Sub