Formula Operators Based On Cell Content

I’d like to create a formula that takes input from a table to determine it’s operators. So for instance, instead of saying X + Y it would say X thisrow.operator Y and a user could then easily change the operator to + - / * = > etc, by just changing that cell and not needing to know how the formula works. This is a simplified example for the purposes of the question.

I know this is not possible the way I have laid it out, but is it possible at all?

HI Vince,

What you could do is the following:
In the formula column, write a (series?) of if statements:
If thisrow.operator = “+”
then X+Y,
If thisrow.operator = ""
then X



Yup! Just use a switch() where the “expression” is a single select field containing the different operators

Then just have the different arguments match what the user selects.

If: select = x, then X * Y
If: select = >, then X > Y


That’s what I was afraid of. I have about 5 of these to right for 20 different criteria was hoping I could do a more literal swap but I guess not.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.