|
Option Explicit
Sub TEST2()
Dim ar, br, i&, j&, r&
Application.ScreenUpdating = False
ar = Worksheets(1).[A1].CurrentRegion.Value
ReDim br(UBound(ar) * UBound(ar), 1 To 2)
br(0, 1) = "题干": br(0, 2) = "选项"
For i = 2 To UBound(ar)
For j = 2 To UBound(ar, 2)
r = r + 1
If j = 2 Then br(r, 1) = ar(i, 1)
br(r, 2) = ar(i, j)
Next j
Next i
With Worksheets(2)
With .Cells
.ClearContents
.Borders.LineStyle = xlNone
End With
With .[A1].Resize(r + 1, 2)
.Value = br
.Borders.LineStyle = xlContinuous
End With
.Activate
End With
Application.ScreenUpdating = True
Beep
End Sub
|
评分
-
1
查看全部评分
-
|