主要還是採你目前的架構
加上兩個陣列來存值
最後你再看要印到哪裡
作法沒有很簡潔 可是應該蠻易懂的
Sub test()
Dim b, d, e As Integer
Dim arr_count, i As Integer
Dim Arr1() As Double
Dim Arr2() As Double
Dim v As Variant
'陣列數量
arr_count = Sheets("X VIA").Range("A65536").End(xlUp).Row / 2 - 2
'定義陣列大小
ReDim Preserve Arr1(arr_count)
ReDim Preserve Arr2(arr_count)
b = Sheets("X VIA").Range("A65536").End(xlUp).Row
i = 0
For d = 3 To b Step 2
'存到陣列裡面
Arr1(i) = Worksheets("X VIA").Cells(d, 12)
i = i + 1
Next d
i = 0
For e = 4 To b Step 2
'存到陣列裡面
Arr2(i) = Worksheets("X VIA").Cells(e, 12)
i = i + 1
Next e
'顯示陣列結果(自己再看要寫到哪裡)
For Each v In Arr1
MsgBox (v)
Next v
For Each v In Arr2
MsgBox (v)
Next v
End Sub