# Values and conditions in FileMaker Pro 7

This topic is 7031 days old. Please don't post here. Open a new topic instead.

## Recommended Posts

• Newbies

Hi,

I'm a newbie with Filemaker Pro 7...I want to create a formula as follow:

I have a value1 and I have a conditions to have a result in value2

If value1 is < 1 then the value2 is 10

If value1 is > 1 and < 5 then the value2 is 20

If value1 is > 5 and < 10 then the value2 is 30

and so on....

##### Share on other sites

What do you mean 'and so on'? I don't see a pattern here.

And what happens when value 1 = 1 or value 1 = 5, and so on?

##### Share on other sites

Would love to use Choose() here but you are correct - it's missing 1,5 etc.

Hard code could be:

Case(

Value1 < 1; 10;

Value1 < 5; 20;

Value1 < 10; 30

)

... and so on.

##### Share on other sites

Post deleted by LaRetta

##### Share on other sites

I don't know if it works or not - because I don't know what it is supposed to do. There are only three ranges - and you assume one of them to be an exception. That is not enough data.

FWIW, I think you can achieve the same result by:

Case ( n < 1 ; 10 ; 10 * ( Div ( n ; 5 ) + 2 ) )

Or, if you'd like the boundaries fall the other way:

Case ( n <= 1 ; 10 ; 10 * ( Ceiling ( n / 5 ) + 1 ) )

But writing formulae that hit some arbitrary target with arbitrary input is not my idea of fun. Let the poster clarify the logic behind this, and the formula will practically write itself.

##### Share on other sites

This topic is 7031 days old. Please don't post here. Open a new topic instead.

## Create an account

Register a new account