define acceptable entries value in cell in Excel
Q39. In Excel, how can I ensure that user enters only certain acceptable values in an input cell?
For example, for geographical latitude input the acceptable values can be -90 to +90. Any value outside this range is not a valid latitude. In Excel, how can I prevent users from entering values outside of this range?
To do it in Excel, here is the answer:
a) Select the field for Latitude input. Under "Data" tab, click Data Validation -> Data Validation.
b) Select "Decimal" for Allow field (since latitude could be in decimals) and enter "between", "-90" and "90" for Data, Minimum and Maximum fields respectively so that input is restricted to values between -90 and +90. Click OK.
c) If user inputs a value outside of the range (-90 to +90), error message appears asking user to retry or cancel.