发布网友 发布时间:2022-04-22 05:03
共2个回答
热心网友 时间:2023-06-25 16:22
'自定义公式-按ALT+F11-插入-模块
Sub 提取()
Dim m As Integer
For i = 1 To 100
If Cells(i, 3) = "" Then Exit For
m = m + 1
Cells(m, 4) = Left(Cells(i, 3), InStr(Cells(i, 3), "A") - 1)
m = m + 1
Cells(m, 4) = Mid(Cells(i, 3), InStr(Cells(i, 3), "A"), InStr(Cells(i, 3), "B") - InStr(Cells(i, 3), "A"))
m = m + 1
Cells(m, 4) = Mid(Cells(i, 3), InStr(Cells(i, 3), "B"), InStr(Cells(i, 3), "C") - InStr(Cells(i, 3), "B"))
m = m + 1
Cells(m, 4) = Mid(Cells(i, 3), InStr(Cells(i, 3), "C"), InStr(Cells(i, 3), "D") - InStr(Cells(i, 3), "C"))
m = m + 1
Cells(m, 4) = Right(Cells(i, 3), Len(Cells(i, 3)) - InStr(Cells(i, 3), "D") + 1)
Next
End Sub
热心网友 时间:2023-06-25 16:22
你可以试下分列功能
因为我看你表格里面的内容主要是空格分开的,我也不知道是不是,如果不是你也可以先用“。”句号将题目与答案分开,然后再用空格将各答案分开