Custom Format For Typing Latitude & Longitude GPS

muhammad susanto

Well-known Member
Joined
Jan 8, 2013
Messages
1,810
Office Version
  1. 2013
Platform
  1. Windows
hi all..

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

case 1
(Latitude)
data
desired result
1679755
1.679755
18632547
1.8632547

<tbody>
</tbody>

case 2
(Longitude)
data
desired result
101429118
101.429118
101419375
101.419375

<tbody>
</tbody>

thank for your helping

.sst
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

DSCfromCFA

Board Regular
Joined
Feb 27, 2018
Messages
147
Office Version
  1. 365
Platform
  1. Windows
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
 

muhammad susanto

Well-known Member
Joined
Jan 8, 2013
Messages
1,810
Office Version
  1. 2013
Platform
  1. Windows
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
 

DSCfromCFA

Board Regular
Joined
Feb 27, 2018
Messages
147
Office Version
  1. 365
Platform
  1. Windows
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,129,383
Messages
5,635,942
Members
416,889
Latest member
dhegs

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
Top