# Handling Validation for Proper Latitude

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.

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:

1. Select cell A1.
2. Choose Validation from the Data menu. Excel displays the Data Validation dialog box.
3. The Settings tab should be displayed. (See Figure 1.)
4. Figure 1. The Settings tab of the Data Validation dialog box.

5. Using the Allow drop-down list, choose Whole Number.
6. In the Minimum and Maximum boxes enter 0 and 90, respectively.
7. Adjust the settings on the other tabs of the dialog box, as desired.
8. Click OK.

Now, assuming that you enter minutes into cell B1, you could set up validation for the minutes in this manner:

1. Select cell B1.
2. Choose Validation from the Data menu. Excel displays the Data Validation dialog box.
3. The Settings tab should be displayed.
4. Using the Allow drop-down list, choose Whole Number.
5. In the Minimum box enter 0.
6. In the Maximum box enter =IF(A1=90,0,59).
7. Adjust the settings on the other tabs of the dialog box, as desired.
8. Click OK.

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.

Related Tips:

Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!

 *Name: Email: Notify me about new comments ONLY FOR THIS TIP Notify me about new comments ANYWHERE ON THIS SITE Hide my email address *Text: *What is 5+3 (To prevent automated submissions and spam.)

Dennis Walden    09 Sep 2014, 11:18
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.

# Our Company

Sharon Parq Associates, Inc.

# Our Sites

Tips.Net

Beauty and Style

Cars

Cleaning

Cooking

ExcelTips (Excel 97–2003)

ExcelTips (Excel 2007–2016)

Gardening

Health

Home Improvement

Money and Finances

Organizing

Pests and Bugs

Pets and Animals

WindowsTips (Microsoft Windows)

WordTips (Word 97–2003)

WordTips (Word 2007–2016)

Excel Products

Word Products

# Our Authors

Author Index

Write for Tips.Net