|
本帖最后由 mind1238 于 2018-10-9 14:18 编辑
想要麻烦帮我改单一下这个公式
也是按照原有的表中的规则
现在就是改良一下
逻辑是一样的
中间增加了厚度
Option Explicit
Sub test()
Dim arr, i, dic, t
arr = [a1].CurrentRegion.Offset(1)
Set dic = CreateObject("scripting.dictionary")
For i = 1 To UBound(arr, 1) - 1
dic(arr(i, 1) & arr(i, 2) & "|" & arr(i, 3)) = arr(i, 4)
Next
arr = [f1].CurrentRegion.Offset(1)
For i = 1 To UBound(arr, 1) - 1
t = arr(i, 2) & arr(i, 3) & "|" & arr(i, 4)
arr(i, 5) = IIf(dic.exists(t), Round(dic(t), 2), vbNullString)
Next
[f2].Resize(UBound(arr, 1) - 1, UBound(arr, 2)) = arr
End Sub
|
|