I'm not sure if it's appropriate to ask questions about excel. I just want to create an IF function in excel, and I want to test whether a certain cell contains "$."
我不确定是否适合询问有关excel的问题。我只想在excel中创建一个IF函数,我想测试某个单元格是否包含“$”。
For example, I want to say: =IF("$" is in cell $B$3, True, False).
例如,我想说:= IF(“$”在单元格$ B $ 3中,True,False)。
I'm not used to excel, and was wondering if there is like "in" function for excel. Thank you.
我不习惯excel,并且想知道excel是否有类似“in”的功能。谢谢。
Edit: Sorry, the question wasn't clear. Can I test for the currency of a certain cell? i.e. IF B12's currency is USD, return X.
编辑:对不起,问题不明确。我可以测试某个单元格的货币吗?即如果B12的货币是美元,则返回X.
3 个解决方案
#1
#2
1
you can use:
您可以使用:
=ISNUMBER(SEARCH("$",$B$3))
The "SEARCH("$",$B$3)" part will return an integer location for the "$" in the cell, or #VALUE! if it doesn't find it.
“SEARCH(”$“,$ B $ 3)”部分将返回单元格中“$”的整数位置,或#VALUE!如果没有找到它。
The "=ISNUMBER()" part just checks if SEARCH gave it a number or not.
“= ISNUMBER()”部分只检查SEARCH是否给它一个数字。
Hope that helps!
希望有所帮助!
#3
-1
Just use IF
只需使用IF
https://support.office.com/en-gb/article/IF-function-69aed7c9-4e8a-4755-a9bc-aa8bbff73be2
=IF(B3="$", "True", "False")
#1
3
Use this:
=IF(CELL("format",B3)="C2","True","False")
You may need to test the cells in question to ensure that CELL("format",B3)
returns C2
for you local settings, and change the test accordingly.
您可能需要测试相关单元格以确保CELL(“format”,B3)为您的本地设置返回C2,并相应地更改测试。
#2
1
you can use:
您可以使用:
=ISNUMBER(SEARCH("$",$B$3))
The "SEARCH("$",$B$3)" part will return an integer location for the "$" in the cell, or #VALUE! if it doesn't find it.
“SEARCH(”$“,$ B $ 3)”部分将返回单元格中“$”的整数位置,或#VALUE!如果没有找到它。
The "=ISNUMBER()" part just checks if SEARCH gave it a number or not.
“= ISNUMBER()”部分只检查SEARCH是否给它一个数字。
Hope that helps!
希望有所帮助!
#3
-1
Just use IF
只需使用IF
https://support.office.com/en-gb/article/IF-function-69aed7c9-4e8a-4755-a9bc-aa8bbff73be2
=IF(B3="$", "True", "False")