回復 1#naruto018
試試看!
Public Sub 測試3()
Dim 文本(), 文本A()
With Worksheets("1111")
n = 0
文本 = .Range("P3").Resize(4, 2).Value
For i = 1 To 4
If 文本(i, 2) <> Empty Or 文本(i, 2) <> "無" Then
n = n + 1
' ReDim Preserve 文本A(1 To n, 1 To 2)
ReDim Preserve 文本A(1 To 2, 1 To n)
For c = 1 To 2
' 文本A(n, c) = 文本(i, c)
文本A(c, n) = 文本(i, c)
Next
End If
Next
End With
End Sub作者: naruto018 時間: 2017-4-9 09:14