将Z和LT定义为Long
ActiveCell.FormulaR1C1 = "=NORMSINV(RC[-1])"
Z = ActiveCell.Value
ActiveCell.Formula = _
"=VLOOKUP($B$1,Sheet3!$A$74:$D$97,4,FALSE)"
LT = ActiveCell.Value
ActiveCell.FormulaR1C1 = "=" + Z + "*RC[-2]*SQRT(" + LT + ")"
这一行给出了类型错误
答案 0 :(得分:1)
你需要更换' +'与&这就是连接在VBA中的工作原理