gpt4 book ai didi

vba - vba vlookup/错误处理-类型不匹配错误

转载 作者:行者123 更新时间:2023-12-03 08:57:40 25 4
gpt4 key购买 nike

我正在获取run time error 13 - type mismatch error
有任何想法吗?

outputCell = "=IF(ISNA(VLOOKUP(A" & row & ",'Current Defects'!$A$" & 2 & ":$B$" & 1000 & ",2,FALSE))," - ", (=VLOOKUP(A" & row & ",'Current Defects'!$A$" & 2 & ":$B$" & 1000 & ",2,FALSE))"

最佳答案

在第二个(=之前摆脱VLOOKUP

您也没有在IsNA函数中正确转义双引号。

在一行上,尝试:

outputCell = "=IF(ISNA(VLOOKUP(A" & row & ",'Current Defects'!$A$" & 2 & ":$B$" & 1000 & ",2,FALSE)),"" - "", VLOOKUP(A" & row & ",'Current Defects'!$A$" & 2 & ":$B$" & 1000 & ",2,FALSE))"

为了清晰起见,请将其分成多行:
outputCell = "=IF(ISNA(VLOOKUP(A" _
& row & ",'Current Defects'!$A$" & 2 & ":$B$" & 1000 & ",2,FALSE))," _
& """ - "", VLOOKUP(A" & row & ",'Current Defects'!$A$" & 2 & ":$B$" _
& 1000 & ",2,FALSE))"

关于vba - vba vlookup/错误处理-类型不匹配错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18876335/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com