Excel.Tips.Net ExcelTips (Menu Interface)

Displaying Latitude and Longitude

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: Displaying Latitude and Longitude.

If you do much geographic work, you may wonder if you can use Excel to display longitude and latitude in a cell in terms of degrees, minutes, and seconds. There are three ways that a solution can be approached.

First, if you just want to affect the display, you can follow these steps:

  1. Select the cell you want to format for latitude or longitude.
  2. Choose Cells from the Format menu. Excel displays the Format Cells dialog box.
  3. Make sure the Number tab is selected. (See Figure 1.)
  4. Figure 1. The Number tab of the Format Cells dialog box.

  5. In the categories list, choose Custom.
  6. Place the insertion point in the Type box and erase whatever is there.
  7. Type three # signs.
  8. Hold down the Alt key and type 0176 on the numeric keypad. (This inserts the degree symbol—and you must use the numeric keypad.)
  9. Type a space, two zeros, an apostrophe (the single quote), and another space.
  10. Type two more zeros followed by two more apostrophes. (A quote mark won't work; it must be two apostrophes.)
  11. Click on OK.

Now, if you type a number such as 1234543 into the cell, it is displayed as 123 degrees, 45 minutes, and 43 seconds.

Sometimes, however, you may want to take a decimal value that represents latitude and longitude and display it in degrees, minutes, and seconds. For instance, you may want 122.44 (which is a decimal representation of degrees) to be displayed as 122 degrees, 26 minutes, and 24 seconds. This cannot be accomplished with formatting the cell in which the number is contained. Instead, you must use a formula to achieve the proper display. For instance, if 122.44 is in cell A7, then you can put the following in cell B7:

=TEXT(TRUNC(A7), "0" & CHAR(176) & " ") & TEXT(INT((ABS(A7)
- INT(ABS(A7)))*60), "0' ") & TEXT(((((ABS(A7)-INT(ABS(A7)))*60)
- INT((ABS(A7) - INT(ABS(A7)))*60))*60), " 0''")

This is a long formula, but it provides the desired formatting of the latitude or longitude value. The result is text, and cannot be used in any calculations. If you want to use a display instead, you can simply divide the decimal value of the latitude or longitude by 24, which converts it into the same value ranges used by Excel to represent times. Then you can format the display of the formula as follows:

  1. Select the cell containing the formula.
  2. Choose Cells from the Format menu. Excel displays the Format Cells dialog box.
  3. Make sure the Number tab is selected.
  4. In the categories list, choose Custom.
  5. Place the insertion point in the Type box and erase whatever is there.
  6. Type [h] followed by a degree sign (remember; you hold down the Alt key and type 0176 on the numeric keypad).
  7. Type a space, mm, an apostrophe, another space, ss, and two more apostrophes.
  8. Click on OK.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (3016) 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: Displaying Latitude and Longitude.

Related Tips:

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!


Leave your own comment:

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

Comments for this tip:

Ricker    23 Mar 2016, 17:56
CC and Hirna,
Modified Degrees and decimal minutes when negative values are included then try this modification.

TEXT(TRUNC(A7), "0") & CHAR(176) &" " & TEXT(ABS(A7-TRUNC(A7))*60,"0.0000000") & "'"

-22.5123 translates to -22° 30.7380000'
Ricker    23 Mar 2016, 13:42
Fantastic! The formula must be inserted into a single cell. It works better than ANYTHING else I have found so far.
Do you also have a formula converting DMS value, with or without spaces to decimal degrees?
Thank you,
Marcel Jinca    28 Dec 2015, 15:25
I applied this formula in Excel 2003 for declination values, but something strange happens. For negative values between -0°,999 and 0°, minus sign, no longer appears in the cell and value, although it is negative, it appears to be positive. For any value from -1 to -89 999, it is OK. How can I correct? Thank you.
CC    21 Oct 2015, 14:21
This formula will provide the following resultset:

27° 19.9581'

=TEXT(TRUNC(F14), "0") & CHAR(176) &" " & TEXT((F14-TRUNC(F14))*60,"0.0000000") & "'"
hirna    18 Sep 2015, 10:28
my longitudes and latitudes have seconds that are over 60 how do i fix this
Dirk    29 Jun 2015, 09:49
Thank you for the Help!
Willy Vanhaelen    29 Jun 2015, 05:52

This formula should do the trick:

=TRUNC(F14)&"° "&ROUND(MOD(ABS(F14),1)*60,4)&"'"
dirk    28 Jun 2015, 17:13
I am needing this formula to only have degrees and minutes. i was able to figure it out to round the minitues, but this is what i need.

Ex 27.33263539 degrees

to 27° 19.9581'

=TEXT(TRUNC(F14), "0" & CHAR(176) & " ") & TEXT(INT((ABS(F14)
- INT(ABS(F14)))*60), "0' ")

this is what i used, but i cant get it to show decimal of minute

your help would be greatly appreciated.

Our Company

Sharon Parq Associates, Inc.

About Tips.Net

Contact Us


Advertise with Us

Our Privacy Policy

Our Sites


Beauty and Style




DriveTips (Google Drive)

ExcelTips (Excel 97–2003)

ExcelTips (Excel 2007–2016)



Home Improvement

Money and Finances


Pests and Bugs

Pets and Animals

WindowsTips (Microsoft Windows)

WordTips (Word 97–2003)

WordTips (Word 2007–2016)

Our Products

Helpful E-books

Newsletter Archives


Excel Products

Word Products

Our Authors

Author Index

Write for Tips.Net

Copyright © 2016 Sharon Parq Associates, Inc.