Any elegant formula to check if a value lies within a range?

Using switchIf is what my gut tells me to do here, however, I’d like to easily edit the ranges from a table without having to toy with the formula.

Hope this makes sense…

Thanks guys!

Any elegant formula to check if a value lies within a range?

Using switchIf is what my gut tells me to do here, however, I’d like to easily edit the ranges from a table without having to toy with the formula.

Hope this makes sense…

Thanks guys!

Something like this ?

(There’s an example with an `If()`

and one with `SwitchIf()`

)

3 Likes

Even simpler, just

`thisRow.Value >= thisRow.[Min Range] AND thisRow.Value <= thisRow.[Max Range]`

I’m wondering why I’m seeing so many people eager to wrap what already produces a true/false value into `If(..., True(), False())`

. Is this an Excel habit?

3 Likes

@Paul_Danyliuk : Thanks ! I added it to the doc !

( I really have a problem with “simple formulas” … I always go for the “complex ones” first )

Not coming from Excel or Sheets, I think, at least in my case, it comes from the fact that I’m getting used to write complex formulas to do complex things with my docs (it becomes a reflex, an instinct) and I’m simply losing sight of the very simple formulas (like in this case where, effectively, the result can only be `True()`

or `False()`

and I just forgot it) .

There’s that and the fact that I’m not fully awake yet

But thank you for the reminder

1 Like

Awesome contributions fam! Appreciate the time and help!

“Is this an Excel habit?” never thought in the age of Coda this would sting so much.

1 Like

You help is very appreciated!

1 Like

Glad to know it helped !

1 Like