答案1
答案2
如果你从此开始Sheet1
:
并运行此宏:
Sub MakeReport()
Dim k As Long, i As Long, N As Long, s1 As Worksheet, s2 As Worksheet
Dim v1 As String, v2 As String, lt As String, L As Long, ll As Long
Set s1 = Sheets("Sheet1")
Set s2 = Sheets("Sheet2")
N = s1.Cells(Rows.Count, "A").End(xlUp).Row
k = 1
For i = 2 To N
v1 = s1.Cells(i, 1).Value
v2 = s1.Cells(i, 2).Value
lt = s1.Cells(i, 3).Value
L = Len(lt)
For ll = 1 To L
s2.Cells(k, 1) = v1
s2.Cells(k, 2).Value = v2
s2.Cells(k, 3) = Mid(lt, ll, 1)
k = k + 1
Next ll
Next i
End Sub
您将在以下位置获得它Sheet2
: