Hi
I want to create a spreadsheet report and therefore use IF() formula.
My question, is it possible to use IF() formula to check a cell for a certain text or word and if yes then state 1 if not state 0?
e.g. IF(A1="text";1;0)
BR
Alex
Hi
I want to create a spreadsheet report and therefore use IF() formula.
My question, is it possible to use IF() formula to check a cell for a certain text or word and if yes then state 1 if not state 0?
e.g. IF(A1="text";1;0)
BR
Alex
Yes, of course, that's possible. Please see the example below. If you change the value in cell B4 to "grey", then you will see the text "it's raining" in cell C4.
It also shows that if the condition is evaluated as true, then the second parameter is use as the result of the If-statement. If it is evaluated as false, then the third parameter is taken.
Hi Hisham,
As far as I know, the if formula can only handle < and > but = does not work. Or at least I was never able to get it working^^
Hope this helps- or maybe someone else has a good idea/ knows more :)
Best,
Veronika
To compare, you can use '==' (equal) or '!=' (not equal) or you could use the NOT-function
Hi Koen,
I appreciate you comment a lot! You really solved a mystery (because I never understand why "=" would not work - and it wasn't listed in the help).
Thanks a lot for that - you made my day^^
Best,
Veronika
Hi Hisham,
with Koen's help, the syntax is easy :)
=if(QUERY_ATTRIBUTE_VALUE(YOURCELL;ATTRIBUTE)=="SEARCHTEXT";1;0)
So, to give you an example, it would look like this:
B2 = item type
C1= attribute
=IF(QUERY_ATTRIBUTE_VALUE(B2;C1)=="Perfect hint from Koen";1;0)
Hope this helps.
Best,
Veronika