我正在使用 if 语句来检查单元格是否为数字。如果是,则返回原始数字,否则返回字符串"不是数字"。但是,我在输出字符串"不是数字"时遇到了一些麻烦。以下是我正在使用的功能,如何修改它?
=if(isnumber(A1), A1, 'Not a number')
当 A1 是数字时它有效,但在它不是数字时失败。
您缺少双引号。
试试这个
=if(isnumber(A1), A1,"Not a number")