Jump to content

Woksheet Minimum and Maximum


Recommended Posts

I have a Worksheet which returns a value from one cell into another from the Existing Tree Tool

=G3*12

Simple enough

I need to be able to limit the answer to a minimum of 2000 and a maximum of 15000 I imagine using if statements

In other words the value cannot go below 2000 or above 15000

Can anyone help and hopefully explain how I can even begin to think about it

Link to comment

Ozzie

Attached is a simple example.

The IF/THEN statement looks like this:

=IF((A4<2000), (2000), IF((A4>15000), (15000), (A4)))

In English it means

= IF the value of A4 is less than 2000

............THEN 2000

............ELSE IF the value of A4 is greater than 15000

.................................THEN 15000

.................................ELSE use the value of A4

So the syntax is

=IF( (conditional) [, = THEN] (result) [, = ELSE] (result))

The above example just has a IF/THEN/ELSE statement nested in the ELSE. I don't know if there is a limit to how deep they can nest. I've never hit the limit if there is one.

The example will work without the () around the conditional and results. [ie., =IF(A4<2000, 2000, IF(A4>15000, 15000, A4)) will still work] But when a IF/THEN/ELSE doesn't work, adding the () often makes it work.

hth

mk

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...