My question is simple and involves the If function.
I have a variable that refers to the status of my stock product. There are more than 10 possible types of different statuses, but I want to make a function that IF the status is equal to "Status A" or "Status B" or "Status C" or "Status D" THEN does the action.
It is enough that only one of the 4 statuses that I have listed is the same as the current one to trigger the action. Inside the IF everything goes well when I put only 1 status in the condition, but I want it to happen correctly for any of the 4 I mentioned, I tried to use ||, && and Or between the statuses in the IF but it doesn't work.
Can someone help me? I imagine it is something simple.
Solved! Go to Solution.
You can consider to put these all in the If statement such as:
If(yourVar = "Status A" || yourVar = "Status B" || yourVar = "Status C" || yourVar = "Status D", ...
You can also shortcut it with the following:
If(yourVar in "Status A|Status B|Status C|Status D", ...
The bars ( | ) in the above are only there for visual separation.
I hope this is helpful for you.
You can consider to put these all in the If statement such as:
If(yourVar = "Status A" || yourVar = "Status B" || yourVar = "Status C" || yourVar = "Status D", ...
You can also shortcut it with the following:
If(yourVar in "Status A|Status B|Status C|Status D", ...
The bars ( | ) in the above are only there for visual separation.
I hope this is helpful for you.
User | Count |
---|---|
203 | |
92 | |
83 | |
47 | |
42 |
User | Count |
---|---|
252 | |
105 | |
103 | |
62 | |
57 |