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 ContributorTq! Achieved the result. Grateful 🙂