Sub zz()
Dim no_ar, arr, sh_ar
sh_ar = [{"數值1","陣列1";數值2","陣列2";數值3","陣列3"}]
For i = 1 To UBound(sh_ar)
With Sheets(sh_ar(i, 1))
Set no_ar = .Range("a1:b" & .Cells(Rows.Count, 1).End(3).Row)
arr = Sheets(sh_ar(i, 2)).[a1].CurrentRegion
For j = 1 To no_ar.Rows.Count
no_ar(j, 2) = Application.Match(no_ar(j, 1), arr, 0)
Next: End With: Next
Set no_ar = Nothing
End Sub作者: EGBT 時間: 2015-9-2 14:23
回復 38#EGBT
401298E-45 到 3.402823E38 是科學記號,請GOOGLE 查看了解
Dim i, y, x As Single
'i, y 沒指定都是 As Variant,V請自行查看 VBA 的說明
i, y 程式可以接受傳回錯誤值,
x As Single 必須是傳回數字,程式不接受錯誤值.