Custom Format For Typing Latitude & Longitude GPS

muhammad susanto

Well-known Member
Joined
Jan 8, 2013
Messages
2,089
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
hi all..

how to creating Custom Format to typing Latitude & Longitude
like this :

case 1
(Latitude)
[TABLE="width: 500"]
<tbody>[TR]
[TD]data
[/TD]
[TD]desired result
[/TD]
[/TR]
[TR]
[TD]1679755
[/TD]
[TD]1.679755
[/TD]
[/TR]
[TR]
[TD]18632547
[/TD]
[TD]1.8632547
[/TD]
[/TR]
</tbody>[/TABLE]

case 2
(Longitude)
[TABLE="width: 500"]
<tbody>[TR]
[TD]data
[/TD]
[TD]desired result
[/TD]
[/TR]
[TR]
[TD]101429118
[/TD]
[TD]101.429118
[/TD]
[/TR]
[TR]
[TD]101419375
[/TD]
[TD]101.419375
[/TD]
[/TR]
</tbody>[/TABLE]

thank for your helping

.sst
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
G'day Muhammad,

There are a few methods that may do what you want, however can you please clarify or confirm the following:
1. Lattitude can be either a 7 or 8 digit number, with the decimal after the first digit in both cases
2. Longitude is always a 9 digit number with the decimal always after the third digit
3. There is no other means of distinguishing the Lats from Longs other than the number of digits OR are they in different columns or rows?

Regards, DSC
 
Upvote 0
hi DSC...
i mean..how to insert/adding mark "." between number like sample above
case 1 or case 2 there are different column and row
 
Upvote 0
Simple division would do it - which is why I asked the questions about the number of digits.

Assuming that the three number lengths you gave above are fixed, i.e Lats only come as 7 or 8 digit numbers and Longs only come in 9 digit numbers, then the following formula placed in a new column would work

=IF(LEN(A2)=8,A2/10^7,A2/10^6)

If the data is A2 is 8 digits it divides it by 10^7 to put the decimal point after the first digit, otherwise it divides by 10^6 to put the decimal behind the first digit in a 7 digit number or the third digit in a 9 digit number.
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,187
Members
452,616
Latest member
intern444

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top