|
- Sub sample()
- On Error Resume Next
- Dim MyRow As Long, i As Long
- Dim MySp
- For MyRow = Cells(Rows.Count, 1).End(xlUp).Row To 2 Step -1
- MySp = Cells(MyRow, 8)
- MySp = Split(MySp, Chr(10))
- Cells(MyRow + 1, 8).Resize(UBound(MySp) - 1, 1).EntireRow.Insert
- Cells(MyRow, 8).Resize(UBound(MySp), 1) = MySp
- MySp = Cells(MyRow, 9)
- MySp = Split(MySp, Chr(10))
- Cells(MyRow, 9).Resize(UBound(MySp), 1) = MySp
- For i = 1 To UBound(MySp) - 1
- MySp = Range(Cells(MyRow, 1), Cells(MyRow, 7))
- Range(Cells(MyRow + i, 1), Cells(MyRow + i, 7)) = MySp
- Next
- Next
- End Sub
复制代码 启用宏后点击click me 的按钮 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|