Ozzie Posted October 11, 2012 Share Posted October 11, 2012 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 Quote Link to comment
michaelk Posted October 11, 2012 Share Posted October 11, 2012 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 Quote Link to comment
michaelk Posted October 11, 2012 Share Posted October 11, 2012 Probably worth noting that the conditionals and results could be computations. ie. =IF((((A4*.9)/3.14)<2000),(TAN(A4)*TAN(A4)),'Hello World') will also.... do something. Besides demonstrating the need for the careful application of parentheses. mk Quote Link to comment
Ozzie Posted October 12, 2012 Author Share Posted October 12, 2012 Hey Michael, thanks so much for your help and explanations Will have a crack at it and see how I go d Quote Link to comment
Recommended Posts
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.