Sub RRA3100()
Application.Run "RRA1"
Application.Run "RRA2"
Application.Run "RRA3"
End Sub
Sub RRA1()
Sheet2.[A2:A65536].ClearContents
X = Sheet2.[A65536].End(xlUp).Row
For B = 2 To 101
Sheet2.Cells(X, 1) = Sheet1.Cells(2, 1) & Sheet1.Cells(1, B) & " " & Sheet1.Cells(2, B)
X = X + 1
Next
End Sub
Sub RRA2()
X = Sheet2.[A65536].End(xlUp).Row
For B = 2 To 101
Sheet2.Cells(X + 1, 1) = Sheet1.Cells(3, 1) & Sheet1.Cells(1, B) & " " & Sheet1.Cells(3, B)
X = X + 1
Next
End Sub
Sub RRA3()
X = Sheet2.[A65536].End(xlUp).Row
For B = 2 To 101
Sheet2.Cells(X + 1, 1) = Sheet1.Cells(4, 1) & Sheet1.Cells(1, B) & " " & Sheet1.Cells(4, B)
X = X + 1
Next
End Sub作者: rouber590324 時間: 2019-9-17 10:17
如下終於試出來拉 感恩
Sub 抓取分析100乘100資料2()
X = Sheet2.[A65536].End(xlUp).Row
K = Sheet1.[A65536].End(xlUp).Row
'MsgBox K
M = Sheet1.Cells(K, Columns.Count).End(xlToLeft).Column()
'MsgBox M
For A = 2 To K
For B = 2 To M
Sheet2.Cells(X + 1, 1) = Sheet1.Cells(A, 1) & Sheet1.Cells(1, B) & " " & Sheet1.Cells(A, B)
X = X + 1
Next
Next
End Sub