2

我正在尝试编写一个 excel if 语句。我不熟悉使用 Excel 具有的所有额外功能。我正在使用一个名为importXML(). 我正在尝试检查我正在使用的函数是否生成“#VALUE!” 错误如下:

if(
   importXML(B1,C1)!="#VALUE!" //check if no error generated, 
   importXML(B1,C1)//if no error is generated, use these cells in the function
   importXML(A1,C1)//else use these cells in the function
)

这可能吗?我是否正确使用 excels if 语句来检查错误?

4

1 回答 1

2

试试这个:

=IF(ISERROR(importXML(B1,C1)),value_if_true,value_if_false)

ISERROR 函数

于 2012-12-10T23:08:20.627 回答