Forum Discussion
Excel problem: I need to let only values between a certain range be in a column and if they are less
It's hard to give specific advice without a more detailed description. Where, for example, are the values coming from?
If you are using formulas to populate the cells in the column you're referring to, you can nest the formula in a couple of IF statements such as this. If the sum of A2 + B2 is greater than 3 and less than 20, it appears as calculated; if it exceeds either the lower or upper limit, that limit appears.
=IF((A2+B2)<3,3,IF((A2+B2)>20,20,A2+B2))
You could also use Data Validation to preclude entering values that exceed a specified minimum or maximum. However, other than an error message, that doesn't display the min or max allowed; just keeps somebody from typing in an invalid number.
So it would be helpful for us in helping you if you were to give a bit more of the bigger picture which this requirement is a part of.
- Ps18priyankaSep 26, 2021Copper ContributorIt's actually related to well log. So upto a certain depth (1000 for example) our hydrostatic head (column h) remains as a constant value of 8.3. After that it depends on other factors so it's basically equal to some other cell value (for example g). Now.. I want my graph to be smooth. Column h has few points which are below 8.3 or 20 (max value). And if a value is 5 for example then I want the value to become 8.3 and if it's 25 I want it as 20 in my graph.
- Ps18priyankaSep 26, 2021Copper ContributorTq! Achieved the result. Grateful 🙂