Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Office 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Displaying Latitude and Longitude.

# Displaying Latitude and Longitude

by Allen Wyatt
(last updated September 27, 2021)

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. Press Ctrl+Shift+F or press Ctrl+1. Excel displays the Format Cells dialog box.
3. Make sure the Number tab is selected.
4. In the categories list, choose Custom. (See Figure 1.)
5. Figure 1. The Number tab of the Format Cells dialog box.

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. (The numbers must be typed on the numeric keypad. This inserts the degree symbol. If you don't have a numeric keypad, you need to enable the Num lock before using the Alt 0176 keyboard shortcut.)
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. Press Ctrl+Shift+F. 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 (9457) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Office 365. You can find a version of this tip for the older menu interface of Excel here: Displaying Latitude and Longitude.

##### Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

##### MORE FROM ALLEN

Working with Roman Numerals

Understanding and using a function to replace an Arabic number with Roman numerals. And, as a bonus, how to change them back.

Discover More

ISO Week Numbers in Excel

Work in an industry that uses ISO standards when it comes to working with dates? You'll love the formula in this tip ...

Discover More

PivotTables for the Faint of Heart

PivotTables are a powerful tool for consolidating huge amounts of data. PivotTables for the Faint of Heart shows ...

Discover More

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!

##### More ExcelTips (ribbon)

Wrapping Text in Merged Cells

When you are formatting your worksheet, Excel lets you easily merge adjacent cells together. If you want to wrap the text ...

Discover More

Converting From Numbers to Text

If you have a range of numeric values in your worksheet, you may want to change them from numbers to text values. Here's ...

Discover More

Ensuring Conditional Formatting and Data Validation is Copied

If you use an Excel worksheet for entering data (a quite common task, actually), then you need to be concerned with how ...

Discover More
##### Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is seven more than 4?

2021-09-30 14:12:39

Mike

Whenever I see a long formula like this one, I always think a UDF might be appropriate (debug it once only). Fortunately, Microsoft (and probably many others) has already done it.

https://docs.microsoft.com/en-us/office/troubleshoot/excel/convert-degrees-minutes-seconds-angles

The first formula inserts a (redundant) space between the Minutes and the apostrophe, but it can be removed and it still works.
The With Application/End With also seem unnecessary.

2019-10-13 20:53:31

Justin Guy

FYI, instead of CTRL+SHIFT+F, you could use CTRL+1 to open the same dialog, and saving yourself one whole keypress in the process!

2019-03-11 16:44:16

Ron

The most straightforward way to display latitude and longitude is to simply use the decimal format. For instance, it makes it easier to calculate distance between two points in Excel. It is also more intuitive and that's what many navigation systems (e.g., Google Maps) have evolved to. However, in Excel, it is challenging to convert the traditional nautical format to the more universal decimal format.

2016-09-14 07:51:05

MIchael Armstrong

If I enter the data as

35:51:21.6

Excel thinks it's a time, and displays it as

51:21.6
(where the 35 went is left as an exercise for the student)

But then if format the cell using the last formula in the tip i.e.:

[h]° mm' ss.0''

it displays as

35° 51' 25.6''

2016-09-13 17:44:47

Ritienne Gauci

Hello

I used your example to type in co-ordinates.
The only problem is that my degree co-ordinates are in the tens

35 degrees, 51 minutes and 25.6 seconds
It is typing it

355° 12' 56.0''

Can I ask you to help me to find the right code? I tried typing 0 before 25 but no go.

RG

2015-07-03 10:33:12

gallie

Hi Allen

I inherited a excel file that uses lat/long positioning and now want to change a few things. When setting up the series the lat and long is easy (x and y axis), but to display the name of each lat and long at the specified position, I cannot figure that one out. Do you perhaps have advise. Much appreciated your trouble.

Gallie

##### This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.