Forum Discussion
Jeffern
Nov 28, 2023Copper Contributor
Use of IF
=IF(B9=0;0;IF(B9='B3'='B2';IF(B9='B4'='B3))) I get error messages If a field='B3', I want to replace it with 'B2', if a field ='B4', I want to replace it with'B3*The fields are either blank(emty) =...
JKPieterse
Nov 28, 2023Silver Contributor
text in a formula needs to go between double quotes:
=IF(A1="The text","Some text if true","Some text if false")
=IF(A1="The text","Some text if true","Some text if false")
- JeffernNov 29, 2023Copper Contributor
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.