Excel公式查询-函数IF(…)
我想在某些单元格的公式中使用 Excel 中的函数 IF() ,如下所示 -
=IF(I2="SELL","(C2-F2)*D2","0")
这意味着我想查看单元格 I2 中是否有文本 - SELL (如果条件为真),那么我希望单元格具有公式为 (C2-F2)*D2,否则如果条件为假,则打印 0。
但问题是,当条件为真时,它不是将文本公式放入,而是将字符串 (C2-F2)*D2 放入它就在那个牢房里。我想要的是,当条件为真时,它应该将 (C2-F2)*D3 解释为该单元格中的公式。我尝试了很多事情,例如 -
=IF(I2="SELL","=((C2-F2)*D2)","0")
或
=IF(I2="SELL","=("(C2-F2)*D2)"","0")
但没有成功。
我怎样才能让它工作?
谢谢你,
-AD
I want to use the function IF() from Excel in a formula for some Cell, as shown below -
=IF(I2="SELL","(C2-F2)*D2","0")
Which means I want to see if Cell I2 has text- SELL in it (IF condition true), then I want the cell to have formula as (C2-F2)*D2, else if condition is false, it prints 0.
But trouble is that when condition is true, instead of putting the formula for the text it is putting the string (C2-F2)*D2 as it is in that Cell. What I want is that when condition is true, it should interpret (C2-F2)*D3 as formula in that cell. I tried many things , like -
=IF(I2="SELL","=((C2-F2)*D2)","0")
or
=IF(I2="SELL","=("(C2-F2)*D2)"","0")
but without any success.
How can I get it working?
thank you,
-AD
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
推杆
正是我一直在寻找的。
谢谢,
-AD
Putting
does what i was looking for.
thanks,
-AD