Comparing values

Hello, could you help me with the following question?

In my application, the user will enter a value. Based on this value, it will be checked if the value is between the minimum and the maximum pre-established. If it is between min and max, the value will receive a status of Y at the end, if it is a number less than min or greater than max, its result will be N. But in some cases, the minimum pre-established value is negative. When min is negative, any value entered, including those that technically will be outside the established MIN and MAX standard, is evaluated as Y.

0 15 266
15 REPLIES 15

Hi, I already use an IF expression in my app

IF (AND ([value_1]> = [min], [result_1] <= [max]), โ€œYโ€,
IF (AND ([value_2]> = [min], [value_2] <= [max]), โ€œYโ€, โ€œNโ€))

But how am I going to use this negative value issue? If any positive number is it, will it always be greater than it

IFS(), not IF().

Does not work. Would you have any examples to show me? I did the expression using IFS but it didnโ€™t solve my problem

Please post a screenshot of the expression you tried.

Read the posted help article.

I used this and made the substitutions, it still doesnโ€™t work
3X_9_d_9d57af654bda1a6bf50abc0aee8d02f60f370f87.png

Where did you use it?

initial value

Was there another attempt at the expression since the last one you posted?

Yes, I made another attempt but it didnโ€™t work. No matter what value I enter in the result, it always returns me as Y.

That was my last attempt.

IFS(
([value_1] < [min]),
โ€œNโ€,
([value_1] >= [min]),
โ€œYโ€,
([value_1] > [max]),
โ€œNโ€,
([value_1] <= [max]),
โ€œYโ€,
([value_2] < [min]),
โ€œNโ€,
([value_2] >= [min]),
โ€œYโ€,
([value_2] > [max]),
โ€œNโ€,
([value_2] <= [max]),
โ€œYโ€)

Good. Now re-incorporate the AND() expressions similar to how you had originally done. Remember you just have 3 conditions to check against, so you should only have 3 condition-value pairs in the IFS().

The doc posted above has several examples. Perhaps you should look at it.

You have 3 cases as shown above. Youโ€™ll have to check the last case first as it can override the logic for the other 2.

Top Labels in this Space