简体   繁体   English

通过if语句提取基于公式的单元格的值

[英]Extract value of formula based cell through if statement

I have a sheet where a cell D2 has a formula ie 我有一张工作表,其中单元格D2具有公式,即

=ISNUMBER(SEARCH("exception",$A2))

It returns TRUE or FALSE. 它返回TRUE或FALSE。 Now i have another cell where it should return the heading of the column if it has TRUE in it. 现在,我有另一个单元格,如果其中包含TRUE,则应返回该列的标题。 So I tried : 所以我尝试了:

=IF(D2="TRUE","Unhandled Exception")

But as it returns FALSE whatever I do, I think its because D2 has a formula in it so it is not returning the value even if TRUE is present. 但是,无论我做什么,它都会返回FALSE,因为D2中有一个公式,所以即使存在TRUE也不会返回值。

I came across the same problem yesterday. 昨天我遇到了同样的问题。 Try changing your formula to 尝试将公式更改为

=IF(D2=TRUE,"Unhandled Exception")

Since the cell will have the value True, not the string "true" 由于单元格将具有值True,而不是字符串“ true”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM