Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Handling Validation for Proper Latitude.
Written by Allen Wyatt (last updated March 25, 2023)
This tip applies to Excel 97, 2000, 2002, and 2003
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.
Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!
When creating a worksheet, you may need to limit what can be entered into a particular cell. Using data validation, you ...
Discover MoreWant to have a small help screen pop up when a user selects a particular cell? This can be done by using data validation, ...
Discover MoreWhen inputting information into a worksheet, you may need a way to limit what can be entered. This scenario is a prime ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2023-03-30 09:12:19
Mike J
Data validation for B1 is dependent on the value of A1, but A1 is also dependent on the value of B1.
This tip assumes that B1 is zero/blank when degrees are entered into A1. Enter a number > 1 into B1 and 90 will still be accepted in A1 (this could be edited after minutes are entered).
So data validation for A1 needs to be something like
Maximum =IF(B1>0,89,90)
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 © 2024 Sharon Parq Associates, Inc.
Comments