Excel:检查IF语句中的错误

我正在写一个excel if语句。 我是使用Excel所有额外function的新手。 我正在使用一个名为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语句来检查错误?

尝试这个:

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

ISERROR函数