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.

# Displaying Latitude and Longitude

by Allen Wyatt
(last updated February 19, 2020)

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.

##### 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

Copying and Pasting Non-Contiguous Ranges of Cells

Excel makes it easy to copy and paste a range of cells. Easy, that is, unless the range isn't contiguous. If you have a ...

Discover More

Running Macros from Macros

Need to run one macro from within another macro? You can easily do it by using the Run method of the Application object, ...

Discover More

Calculating Elapsed Time with Excluded Periods

When using Excel to calculate elapsed time, there can be all sorts of criteria that affect the formulas you would ...

Discover More

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!

Conditional Page Breaks

Need to have your worksheet printout start on a new page every time a value in a column changes? There are a couple of ...

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

No More Custom Formats Can Be Added

If you make too many formatting changes to your workbook, you could end up with a situation where you cannot make any ...

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 nine minus 1?

2020-06-09 15:39:25

Urje

I still don't see how to deal with the leading zero on a two digit degree. I am trying to put in 3404182 to display as 34° 04' 18.2" and it is consistently displaying as 340° 41' 82.0". What do I need to do differently to get it to recognize a leading zero or some other way to get it to display correctly.

2020-05-11 08:00:33

Partha

In FORMAT CELLS under NUMBER tab in CATEGORY list the "NUMBER" should be replaced as "BASE 10". Another one should be included in the list i.e. "BASE 60".

TIME and ANGLE should come in the TYPE list

2019-12-09 15:08:05

Cara

Hi, I am trying to convert lat and long to decimal, but the format they are currently in is date and time - even though it appears they are hr min sec. I need to separate the 3 numbers so that I can enter them into my conversion document, but currently can't. Can you please help me change the format so that I can break down the numbers, to then convert them? Thank you.

2019-01-12 14:11:55

Michael Bennett

Bit clunky (very clunky actually) but trying using Windows Numeric popup Keypad

2019-01-09 12:11:01

Scott

Mr. Wyatt,

Using your instructions above to create a CUSTOM LAT/LON format, all went well EXCEPT step 7 which adds the degree symbol.

"7. Hold down the Alt key and type 0176 on the numeric keypad. (This inserts the degree symbol—and you must use the numeric keypad.)"

I am using Excel 2016 on a laptop and a separate USB/wireless keyboard and number pad.
When I hold the ALT key and press 0176...nothing happens. If I hold the ALT key and use the 0176 on the upper row of the keyboard...all I get is a DING tone with each key stroke. End result is it will not accept the 0176 to create the degree symbol.

I can say that if I hold ALT and press something other than a number (0176) -such as a dash- the DASH gets inserted.
This only seems to fail when holding ALT and pressing NUMBERS.

Can you offer any advice or alternate work-around?

2017-11-29 10:35:36

Dr John Moyle

Help please. Retired engineer and physician but brain is well-retired!!
I want to format cells for Long and Lat and I find Allen's solution works well BUT I need the letter E or W or N or S to follow. Eg, using his example, i want to type 1234543W to come out as 123 degrees, 45 minutes, 43 seconds W.
Is this possible?
Thanks
Dr John

2017-03-08 11:51:37

Great idea, let me check it

2016-12-01 08:33:16

Gerhard

Thanks for the formula. Was very helpful. However it shorts the direction, North East suit or west. How do you insert this in the formula?

2016-10-05 14:37:31

Willy Vanhaelen

@Neeraj

See my comment of 29 Jun 2015.

2016-10-05 06:37:27

Chris Reem

I want to paste hurricane forecast data from NHS and be able to PLOT it on a map.

Cut and paste from NHS like this:

INIT 05/0900Z 21.1N 74.6W 110 KT 125 MPH
12H 05/1800Z 22.3N 75.3W 110 KT 125 MPH
24H 06/0600Z 23.9N 76.6W 115 KT 130 MPH
36H 06/1800Z 25.5N 78.2W 115 KT 130 MPH
48H 07/0600Z 27.2N 79.5W 115 KT 130 MPH
72H 08/0600Z 30.5N 80.2W 95 KT 110 MPH
96H 09/0600Z 32.8N 77.0W 85 KT 100 MPH
120H 10/0600Z 33.1N 74.0W 70 KT 80 MPH

I want to see the variation of the forecast track from each advisory that are released 6 hours apart.

2016-10-04 18:59:46

Neeraj

I want to display the following

Input Value: 33 54.885 S
Output Value: 33°54.885' S

2016-09-14 06:02:42

Marcel Jinca

Martin,
Conversion of decimal degree in DD:MM:SS, try this. Definitely go::
=TEXT(INT(A1);"00° ")&TEXT(INT((A1-INT(A1))*60);"00' ")&TEXT((A1*60-INT(A1*60))*60;"00,00"")

2016-09-13 05:34:04

Martin Johnson

I need to input coordinates in the format of

50° 50' 02.82''

I've tried modifying your instructions but due to my lack of understanding Excel have failed. Can you help me please.

Cheers
Martin

2016-03-23 17:56:47

Ricker

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'

2016-03-23 13:42:42

Ricker

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,
Ricker

2015-12-28 15:25:58

Marcel Jinca

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.

2015-10-21 14:21:25

CC

This formula will provide the following resultset:

27° 19.9581'

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

2015-09-18 10:28:00

hirna

my longitudes and latitudes have seconds that are over 60 how do i fix this

2015-06-29 09:49:06

Dirk

Thank you for the Help!

2015-06-29 05:52:24

Willy Vanhaelen

@dirk

This formula should do the trick:

=TRUNC(F14)&"° "&ROUND(MOD(ABS(F14),1)*60,4)&"'"

2015-06-28 17:13:44

dirk

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.

##### This Site

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.