Forum Discussion
Use of IF
=IF(A1="The text","Some text if true","Some text if false")
Thank you for informing me that double quots are necessary.
I have other problems as well. Can you see what is wrong with the following?
=IF(b9=blank;blank;IF(b9=''B3'';''B2''))
Regards Jan Erik
- HansVogelaarNov 29, 2023MVP
You have to use the double quote character " (Shift+' on my keyboard), not two single quote characters ' next to each other.
And blank is not a valid keyword in Excel. Use the empty string "" (two double quote characters) instead:
=IF(B9="";"";IF(B9="B3";"B2"))What do you want to return if B9 is not empty and not equal to "B3"? In that case, the formula will currently return FALSE because you don't specify the return value.
- JeffernNov 30, 2023Copper ContributorThank you again for the information. I think I get the gist of it now. I will even try to expand the problem to include B4 changed to B3, then there will be three IF's. I hope I can do it with four parenthesis at he end.
- JeffernNov 30, 2023Copper ContributorSorry to bother you again. When enter exactly what you suggest, I get an error message: The formula contains unknown text. I do not understand it. Any suggestions?
- JeffernNov 29, 2023Copper ContributorThank you for your help. I do not know the syntax in excel well. At the end I would enter a double quote. Actually, there is an addition to this problem: If b9=“” B4»»; “B3””,””. This problem is a playlist in tennis which i recurring twice a year.
- HansVogelaarNov 29, 2023MVP
This time. you're using "curly quotes" ”” instead of straight quotes "".
And you definitely shouldn't use »» in Excel.
Also, you forgot the parentheses and a semicolon.
=IF(B9="";"";IF(B9="B3";"B2";""))Alternatively, slightly shorter:
=IF(B9="B3";"B2";"")