Iswar has two cells in which users enter degrees and minutes, which represent latitude. The values can necessarily vary from 0 degrees and 0 minutes to 90 degrees and 0 minutes. He wants to use data validation to check and limit what can be entered in the two cells. For the degrees Iswar can validate that the value is between 0 and 90. The problem is with the minutes cell, which can vary from 0 to 59 unless the degrees cell is 90, then the only acceptable value is 0 minutes. Iswar wonders how he can create the validation for the minutes cell to take this into account.
Assuming that you enter degrees into cell A1, you could set up validation for the degrees in this manner:
Figure 1. The Settings tab of the Data Validation dialog box.
Now, assuming that you enter minutes into cell B1, you could set up validation for the minutes in this manner:
The formula used for the Maximum value (step 6) sets a maximum for the cell based on whatever is entered into cell A1 (the degrees).
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (8232) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Handling Validation for Proper Latitude.
Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!
The data validation capabilities of Excel allow you to easily create drop-down lists showing what data is acceptable for ...
Discover MoreData validation is a great tool for limiting what can be input into a cell. Excel allows you to specify what should ...
Discover MoreData Validation is a great way to limit what a user can enter into a worksheet cell. It may not stop a cell from being ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2014-09-09 11:18:27
Dennis Walden
Using this setup, if you enter a value less than 90 into A1 and then a valid non-zero value in B1, that works as intended.
But it is still possible to then go back and change A1 to read 90 while B1 is greater than zero. In that fashion you can wind up with say, 90 degrees and 54 minutes.
Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2021 Sharon Parq Associates, Inc.
Comments