Ways to calculate distances between coordinates in Excel

Last update: 04/10/2024
Ways to calculate distances between coordinates in Excel

Would you like to know the ways of calculate distances between coordinates in excel? Here we will teach you how to calculate distance in Excel, using Latitude and Longitude, in this tutorial. We invite you to stay with us.

Here you can learn more about: How to Create a Vector Chart in Excel. 3 Steps to Follow

Methods for calculating distances between coordinates in Excel

The search for a precise solution to this problem has led me to numerous sites and attempts at solutions. A long list of related sites is included at the end of all this, but the most crucial for what we have is that the most feasible solution is to calculate the distances between coordinates in Excel.

Now, let's look at the best methods to calculate distances between coordinates in Excel:

Calculate distances between coordinates in Excel (Latitude and Longitude, Formulas)

(Latitude and Longitude, Formulas)
Latitude and Longitude, Formulas

A formula that is accepted to provide results accurate to within millimeters is known as Vincenty's formula. Naturally, the accuracy of the results depends largely on the accuracy of the latitude/longitude pairs that describe the two points.

Why all the fuss about precision? Well, from what we've seen from other formulas, especially those written as a single worksheet function, their values ​​differ quite a bit for what could be considered precision situations. 'criticism for life'.

They are typically short by a number of meters, usually around 20 to 30 feet per statute mile, and after flying only 30 or 40 miles, we wouldn't mind landing several hundred feet short of the approach end of a runway, much less being off by more than 7 miles on a trip between Los Angeles and Honolulu.

Since the general trend in dealing with this type of calculations is "measure it with a micrometer, mark it with chalk and cut it with an axe«What we have here is a very precise micrometer to begin the measurement process.

Method 1: Calculate distances between coordinates in Excel (Formulas for distance)

There are numerous Excel spreadsheet functions that will return an initial bearing from a point to the destination point for a Great Circle route between them and similar formulas to return the distance between them.

But from experience using them and comparing them to known measured distances, Vincenty's method Calculating distances between coordinates in Excel has not been translated into a single spreadsheet function, and it is unlikely to be easy, at least.

Because it relies on iterative calculations to deal with points that are very close to being on exactly opposite sides of the world, implementing it even as a series of Excel spreadsheet formulas is a daunting task.

Method 2: Calculate distances between coordinates in Excel (Working with angles)

But before using the function, there are some preliminary steps to consider. Most significantly, Excel and VB work with angles expressed in radians, not as decimal values ​​of the angles, nor from their initial representation in “plain English.”

Consider this situation:

You have a Latitude represented as 10° 27′ 36″ S (10 degrees, 27 minutes 36 seconds South)

You need to convert that into radians, and there’s no direct way to do that, before we can convert it into radians it needs to be converted into a decimal representation. We need to look at it as: 10.46 which is the decimal equivalent of 10° 27′ 36″ and we need to take into account whether it’s a northern or southern latitude, and southern latitudes are treated as negative numbers.

Fortunately, Microsoft provides a couple of useful functions for converting standard angle notations to their decimal equivalent, and vice versa, on this page: Microsoft Features

Those routines are included in the code section and one of them has a change made to allow making a regular angle input like

  • 10~ 27′ 36″ S instead of 10° 27′ 36″ S

Because ~ is directly accessible from the keyboard, while ° is not.

Method 3: Calculate distances between coordinates in Excel (Converting to Radians)

After converting the standard notation to a decimal value, we still need to convert it to radians and deal with the sign of the radian result.

The routines and formulas here consider negative latitudes to be southern latitudes and negative longitudes to be western longitudes. While this may seem unfair to those of us living in the Western Hemisphere, what can I say other than deal with it?

A decimal degrees value can be converted to radians in several ways in Excel and for this process a simple function is used which is also included in the code presented below.

The basic formula is as follows:

  • Radians = angleAsDecimal x (Pi / 180)
  • where Pi is 3.14159265358979

Method 4: Calculate distances between coordinates in Excel (The ultimate solution)

  1. Step 1:: Copy all of the code below and paste it into a regular code module in your workbook. Instructions for placing the code in a regular module are here: Copy Excel VBA code into a regular module
  2. Step 2:: Set up your worksheet to pass the latitudes and longitudes of the start and end points as standard inputs
  3. Step 3:: then enter a formula to pass them to the distVincenty() function.

Given two points with these coordinates:

1 point:

  • Latitude: 37° 57′ 3.7203″ S
  • Longitude: 144° 25′ 29.5244″ E

2 point:

  • Latitude: 37° 39′ 10.1561″ S
  • Longitude: 143° 55′ 35.3839″ E

The general format of the function call is:

=distVincenty(Pt1_LatAsDecimal, Pt1_LongAsDecimal, Pt2_LatAsDecimal, Pt2_LongAsDecimal)

A raw formula would look like this [Note the double quotes after the seconds inputs]. The SignIt() function, provided as part of the code, converts a standard Angular input to a signed decimal value.

=distVincenty(SignIt(«37° 57′ 3.7203″» S «), SignIt(«144° 25′ 29.5244″» E»), SignIt(«37° 39′ 10.1561″» S»), SignIt(«143° 55′ 35.3839″» E»))

You can use the ~ symbol instead of the ° symbol if it's easier for you:

=distVincenty(SignIt(«37~ 57′ 3.7203″» S«), SignIt(«144~ 25′ 29.5244″» E»), SignIt(«37~ 39′ 10.1561″» S»), SignIt(«143~ 55′ 35.3839″» E»))

If the coordinates of Point 1 are at B2 and C2 and the coordinates of Point 2 are at B3 and C3, then it could be entered as

= distVincenty(SignIt(B2), SignIt(C2), SignIt(B3), SignIt(C3))

The result of the 2 sample points used above should be 54972,271, and this result is in meters.

Method 5: Calculate distances between coordinates in Excel (Problems encountered)

The initial code we started working with generated errors of "too complex formula» into two statements. These statements were initially split into two parts and then those two separate calculations were «they reunited» in a formula to get the final result without the error of «too complex formula«.

  How to get the most out of Sticky Notes in Windows 11

During the preparation of this document, the package was tested on Excel 2010 64-bit and started returning #WORTH! errors for all input values.

The investigation determined that a part of the formula already divided to determine the value deltaSigma was generating an overflow error. This error did not occur in the 32-bit version of Excel 2010, nor in Excel 2003 (a 32-bit application).

The offending line of code was once again split into smaller pieces that were eventually put back together in a mathematically correct process that resulted in the determination of the proper values ​​without resorting to any alterations to the original algorithm.

These sections are indicated in the code comments for the distVincenty() function below.

The longitude latitude code to calculate distances between coordinates in Excel

Now, finally, the code:

'*****************************************

Private Const PI = 3.14159265358979

Private Const EPSILON As Double _

    = 0.000000000001

'=========================================

Public Function distVincenty(ByVal _

  lat1 As Double, ByVal lon1 As Double, _

    ByVal lat2 As Double, _

      ByVal lon2 As Double) As Double

'INPUTS: Latitude and Longitude of

'initial and destination points

' in decimal format.

'OUTPUT: Distance between the

'two points in meters.

'

'=============================

' Calculate geodesic distance (in m)

'between two points specified by

' latitude/longitude (in numeric

' [decimal] degrees)

'using Vincenty inverse formula

' for ellipsoids

'================================

' Code has been ported by lost_species

' from www.aliencoffee.co.uk to VBA

' from javascript published at:

' https://www.movable-type.co.uk/scripts

' /latlong-vincenty.html

' * from: Vincenty inverse formula –

'T Vincenty, «Direct and Inverse

'Solutions of Geodesics on the

' * Ellipsoid with application

'of nested equations', Survey Review,

' vol XXII no 176, 1975

' * https://www.ngs.noaa.gov/

' PUBS_LIB/inverse.pdf

'Additional Reference:

' https://en.wikipedia.org/wiki/

'Vincenty%27s_formulae

'=============================

' Copyright lost_species 2008 LGPL

' https://www.fsf.org/licensing/

' licenses/lgpl.html

'=============================

'Code modifications to prevent

'Formula Too Complex' errors in

'Excel (2010) VBA implementation

' provided by Jerry Latham,

'Microsoft MVP Excel, 2005-2011

' July 23 2011

'=============================

  Dim low_a As Double

  Dim low_b As Double

  Dim f As Double

  Dim L As Double

  Dim U1 As Double

  Dim U2 As Double

  Dim sinU1 As Double

  Dim sinU2 As Double

  Dim cosU1 As Double

  Dim cosU2 As Double

  Dim lambda As Double

  Dim lambdaP As Double

  Dim iterLimit As Integer

  Dim sinLambda As Double

  Dim cosLambda As Double

  Dim sinSigma As Double

  Dim cosSigma As Double

  Dim sigma As Double

  Dim sinAlpha As Double

  Dim cosSqAlpha As Double

  Dim cos2SigmaM As Double

  Dim C As Double

  Dim uSq As Double

  Dim upper_A As Double

  Dim upper_B As Double

  Dim deltaSigma As Double

  Dim s As Double' final result,

' will be returned rounded to

' 3 decimals (mm).

'added by JLatham to break up

' «Too Complex» formulas

'into pieces to properly calculate

'those formulas as noted below

'and to prevent overflow errors when

' using Excel 2010 x64 on

Windows 7 x64 systems

  Dim P1 As Double ' used to calculate

'a portion of a complex formula

  Dim P2 As Double ' used to calculate

'a portion of a complex formula

  Dim P3 As Double ' used to calculate

'a portion of a complex formula

'See https://en.wikipedia.org/wiki

' /World_Geodetic_System

'for information on various Ellipsoid

' parameters for other standards.

'low_a and low_b in meters

' === GRS-80 ===

' low_a = 6378137

' low_b = 6356752.314245

' f = 1 / 298.257223563

'

' === Airy 1830 === Reported best

' accuracy for England

' and Northern Europe.

' low_a = 6377563.396

' low_b = 6356256.910

' f = 1 / 299.3249646

'

' === International 1924 ===

' low_a = 6378388

' low_b = 6356911.946

' f = 1 / 297

'

' === Clarke Model 1880 ===

' low_a = 6378249.145

' low_b = 6356514.86955

' f = 1 / 293.465

'

' === GRS-67 ===

' low_a = 6378160

' low_b = 6356774.719

' f = 1 / 298.247167

'== WGS-84 Ellipsoid Parameters ===

  low_a = 6378137 ' +/- 2m

  low_b = 6356752.3142

  f = 1 / 298.257223563

'=========================

  L = toRad(lon2 – lon1)

  U1 = Atn((1 – f) * Tan(toRad(lat1)))

  U2 = Atn((1 – f) * Tan(toRad(lat2)))

  sinU1 = Sin(U1)

  cosU1 = Cos(U1)

  sinU2 = Sin(U2)

  cosU2 = Cos(U2)

  lambda = L

  lambdaP = 2 * PI

  iterLimit = 100 ' can be set

' as low as 20 if desired.

  While (Abs(lambda – lambdaP) > _

      EPSILON) And (iterLimit > 0)

    iterLimit = iterLimit – 1

    sinLambda = Sin(lambda)

    cosLambda = Cos(lambda)

    sinSigma = Sqr(((cosU2 * sinLambda) _

        ^2) + ((cosU1 * sinU2 – sinU1 _

        * cosU2 * cosLambda) ^ 2))

    If sinSigma = 0 Then

     distVincenty = 0 'co-incident points

      Exit Function

    End If

    cosSigma = sinU1 * sinU2 + cosU1 _

      * cosU2 * cosLambda

    sigma = Atan2(cosSigma, sinSigma)

    sinAlpha = cosU1 * cosU2 * _

      withoutLambda / withoutSigma

    cosSqAlpha = 1 – sinAlpha * sinAlpha

    If cosSqAlpha = 0 Then 'check for

    'a divide by zero

      cos2SigmaM = 0 '2 points on equator

    else

      cos2SigmaM = cosSigma – 2 _

        * sinU1 * sinU2 / cosSqAlpha

    End If

    C = f / 16 * cosSqAlpha * (4 + f _

        * (4 – 3 * cosSqAlpha))

    lambdaP = lambda

'the original calculation is

'Too Complex' for Excel VBA

' to deal with

'so it is broken into segments

'to calculate without that issue

'the original implementation

' to calculate lambda

'lambda = L + (1 – C) * f * sinAlpha * _

  (sigma + C * sinSigma * (cos2SigmaM

' + C * cosSigma * (-1 + 2

' * (cos2SigmaM ^ 2))))

      'calculate portions

    P1 = -1 + 2 * (cos2SigmaM^2)

    P2 = (sigma + C * sinSigma * _

      (cos2SigmaM + C * cosSigma * P1))

    'complete the calculation

    lambda = L + (1 – C) * f _

      * withoutAlpha * P2

  Wend

  If iterLimit > 1 Then

   MsgBox _

   «iteration limit has been reached,» _

        & » something didn't work.»

    Exit Function

  End If

  uSq = cosSqAlpha * (low_a ^ 2 _

    – low_b ^ 2) / (low_b ^ 2)

'the original calculation is

'Too Complex' for Excel VBA

' to deal with

'so it is broken into segments to

'calculate without that issue

  'the original implementation to

' calculate upper_A

  'upper_A = 1 + uSq / 16384 *

' (4096 + uSq * (-768 + uSq *

' (320 – 175 * uSq)))

  'calculate one piece of the equation

  P1 = (4096 + uSq * (-768 _

    + uSq * (320 – 175 * uSq)))

  'complete the calculation

  upper_A = 1 + uSq / 16384 * P1

  'oddly enough, upper_B calculates

'without any issues – JLatham

  upper_B = uSq / 1024 * (256 + uSq _

    * (-128 + uSq * (74 – 47 * uSq)))

'the original calculation is

'Too Complex' for Excel VBA

' to deal with

'so it is broken into segments to

'calculate without that issue

  'the original implementation to

' calculate deltaSigma

  'deltaSigma = upper_B * sinSigma *

' (cos2SigmaM + upper_B / 4 *

' (cosSigma * (-1 + 2

' * cos2SigmaM ^ 2) _

     –upper_B/6 *cos2SigmaM*

' (-3 + 4 * sinSigma ^ 2) *

' (-3 + 4 * cos2SigmaM ^ 2)))

  'calculate pieces of the

' deltaSigma formula

  'broken into 3 pieces to prevent

'overflow error that may occur in

  'Excel 2010 64-bit version.

  P1 = (-3 + 4 * sinSigma ^ 2) * _

    (-3+4*cos2SigmaM^2)

  P2 = upper_B * sinSigma

  P3 = (cos2SigmaM + upper_B / 4 * _

   (cosSigma * (-1 + 2 _

      * cos2SigmaM^2) – _

     upper_B / 6 * cos2SigmaM * P1))

  'complete deltaSigma calculation

  deltaSigma = P2 * P3

  'calculate the distance

  s = low_b * upper_A * _

    (sigma – deltaSigma)

  'round distance to millimeters

  distVincenty = Round(s, 3)

End Function

'=========================================

Function SignIt(Degree_Dec As String) _

    Ace Double

'Input: a string representation of

' a lat or long in the

' format of 10° 27' 36″ S/N

' or 10~ 27' 36″ E/W

'OUTPUT: signed decimal value

' ready to convert to radians

'

  Dim decimalValue As Double

  Dim tempString As String

  tempString = UCase(Trim(Degree_Dec))

  decimalValue = _

    Convert_Decimal(tempString)

  If Right(tempString, 1) = «Y» _

    Or Right(tempString, 1) = “W” Then

    decimalValue = decimalValue * -1

  End If

  SignIt = decimalValue

End Function

'=========================================

Function Convert_Degree(Decimal_Deg) _

  As Variant

'source: https://support.microsoft.com/

' kb/213449

'

'converts a decimal degree

' representation to deg min sec

'as 10.46 returns 10° 27' 36″

'

  Dim degrees As Variant

  Dim minutes As Variant

  Dim seconds As Variant

  With Application

     'Set degree to Integer of

' Argument Passed

     degrees = Int(Decimal_Deg)

     'Set minutes to 60 times the

' number to the right

     'of the decimal for the

' variable Decimal_Deg

     minutes = (Decimal_Deg – _

    degrees) * 60

     'Set seconds to 60 times the

' number to the right of the

     'decimal for the variable Minute

     seconds = Format(((minutes – _

    Int(minutes)) * 60), «0»)

     'Returns the result of degree

' conversion

    '(for example, 10.46 = 10° 27' 36″)

     Convert_Degree = » » & degrees _

    & «° » & Int(minutes) & «' » _

         & seconds + Chr(34)

  End With

End Function

'=========================================

Function Convert_Decimal _

    (Degree_Deg As String) As Double

'source: https://support.microsoft.com/

' kb/213449

   ' Declare the variables to be

' double precision floating-point.

   'Converts text angular entry to

' decimal equivalent, as:

   ' 10° 27' 36″ returns 10.46

   ' alternative to ° is permitted:

' Use ~ instead, as:

   ' 10~ 27' 36″ also returns 10.46

   Dim degrees As Double

   Dim minutes as double

   Dim seconds as double

   '

   'modification by JLatham

   'allow the user to use the ~

' symbol instead of ° to denote degrees

   'since ~ is available from the

' keyboard and ° has to be entered

   'through [Alt] [0] [1] [7] [6]

' on the number pad.

   Degree_Deg = Replace(Degree_Deg, _

    «~», «°»)

   ' Set degree to value before

' «°» of Argument Passed.

   degrees = Val(Left(Degree_Deg, _

    InStr(1, Degree_Deg, «°») – 1))

   ' Set minutes to the value between

' the «°» and the «'»

   ' of the text string for the variable

' Degree_Deg divided by

   ' 60. The Val function converts the

' text string to a number.

   minutes = Val(Mid(Degree_Deg, _

    InStr(1, Degree_Deg, «°») + 2, _

      InStr(1, Degree_Deg, «'») – _

    InStr(1, Degree_Deg, «°») – 2)) / 60

   'Set seconds to the number to the

' right of «'» that is

   'converted to a value and then

' divided by 3600.

   seconds = Val(Mid(Degree_Deg, _

    InStr(1, Degree_Deg, «'») + _

      2, Len(Degree_Deg) – _

    InStr(1, Degree_Deg, «'») – 2)) _

    / 3600

   Convert_Decimal = degrees _

    + minutes + seconds

End Function

'=========================================

Private Function toRad(ByVal _

    degrees As Double) As Double

    toRad = degrees * (PI / 180)

End Function

'=========================================

Private Function Atan2( _

    ByVal X As Double, _

    ByVal And As Double) As Double

 ' code nicknamed from:

 ' https://en.wikibooks.org/wiki/

' Programming:Visual_Basic_Classic/

' Simple_Arithmetic

' #Trigonometrical_Functions

 'If you re-use this watch out:

'the x and y have been reversed from

' typical use.

    If Y > 0 Then

        If X >= Y Then

            Atan2 = Atn(Y / X)

        ElseIf X <= -Y Then

            Atan2 = Atn(Y / X) + PI

        else

        Atan2 = PI / 2 – Atn(X / Y)

    End If

        else

            If X >= -Y Then

            Atan2 = Atn(Y / X)

        ElseIf X <= Y Then

            Atan2 = Atn(Y / X) – PI

        else

            Atan2 = -Atn(X / Y) – PI / 2

        End If

    End If

End Function

'=========================================

How to calculate distances between coordinates in Excel with the distance formula

Now, let's see how to calculate distances between coordinates in Excel with the distance formula:

The generic formula is as follows = SQUARE ROOT (( x2 – x1 ) ^ 2 + ( y2 – y1 ) ^ 2 )

Summary

To calculate the length of a 2D line given the coordinates of two points on the line, you can use the distance formula, adapted for Excel's formula syntax. In the example shown, the formula in G5, copied down, is:

=SQRT((D5 – B5)^2 + (E5 – C5)^2)

where the coordinates of the two points are given in columns B to E.

Explanation

The length of a line can be calculated with the distance formula, which looks like this:

Ways to calculate distances between coordinates in Excel
Formula

Distance is the square root of the change in x squared plus the change in y squared, where two points are given in the form (x 1 , y 1 ) and (x 2 , y 2 ). The distance formula is an example of the application of the Pythagorean Theorem, where the change in x and the change in y correspond to the two sides of a right triangle, and the hypotenuse is the distance being calculated.

In Excel, the distance formula can be written with the exponent operator (^) and the SQRT function is as follows:

  • =SQRT((D5 – B5)^2 + (E5 – C5)^2)

Following Excel's order of operations, the change in x and the change in y are calculated, then they are squared, and the two results are added together and sent to the SQRT function, which returns the square root of the sum as the final result:

=SQRT((D5 – B5)^2 + (E5 – C5)^2)

=SQRT((6)^2 + (8)^2)

= SQRT ( 36 + 64 )

= SQRT ( 100 )

= 10

The POWER function can also be used in place of the exponent operator (^) like this:

= SQRT ( POWER ( D5 – B5 , 2 ) + POWER ( E5 – C5 , 2 ))

with the same result.

Methods for calculating distances between coordinates in Excel (distance, convert degrees and geocode addresses)

If you have a long list of geographic coordinates to work with, a Microsoft Excel spreadsheet will surely come in handy. There are three basic Excel tools that can work for you, no matter how you want to manipulate geographic coordinates.

You'll need to know how to calculate distances between coordinates in Excel, how to convert latitude and longitude data to decimal degrees, and finally how to geocode latitudes and longitudes.

Method 1: Calculate distances between coordinates in Excel

In an example of how to calculate the distance between two coordinates in Excel, we will look to measure the great circle distance. We will notice that latitude and longitude are denoted in degrees, minutes, and seconds.

Ways to calculate distances between coordinates in Excel

How to calculate distances between coordinates in Excel by converting latitude and longitude to decimal degrees

Everything, even something as complicated as degrees, minutes, and seconds, can be converted to decimals. The degrees part remains the same, but the minutes and seconds must be converted to their percentage of a degree and combined.

There are 60 minutes in a degree and 60 seconds in a minute (which means 3600 seconds in a degree). So, divide the minutes by 60 and the seconds by 3.600.

The general formula:

  • Total degrees (in decimal form) = Degrees + [Minutes/60] + [Seconds/3600]

Ways to calculate distances between coordinates in Excel

…About that distance

Now that you have the latitude and longitude values ​​in decimals, you just have to face the equation for nautical miles between Timbuktu and Casablanca, which is given below.

Nautical miles = ACOS [(sin(Lat_place_1*PI()/180)*sin(Lat_place_2*PI()/180)+ cos(Lat_place_1*PI()/180)*cos(Lat_place_2*PI()/180)* cos(Lon_place_2*PI()/180-Lon_place_1*PI()/180)) ] *3443.8985

That three thousandth number, at the end, is the radius of the Earth, in Nautical Miles. Even if you were to substitute the radius of a sphere, assuming the Earth is spherical, at 3437,7468 NM, it will not be close to the true, accurate distance.

Figure: You only have to enter that formula into EXCEL ONCE.
Figure: You only have to enter that formula into EXCEL ONCE.
Figure: The number 4476 is the distance in nautical miles. The decimals are pretty much useless since you know it's an approximation.
Figure: The number 4476 is the distance in nautical miles. The decimals are pretty much useless since you know it's an approximation.

Method 2: Calculate distances between coordinates in Excel (Geocode latitude and longitude)

Geocoding is the conversion of street addresses into mappable latitude and longitude data. Now, there are two ways to geocode latitude and longitude from an Excel spreadsheet: the hard way y the easy way.

We'll first cover the hard way, which is what you'll need if you want the coordinates to live in your Excel document. You'll need to write the sequence of commands Visual Basic (VBA) to make a call to an external geocoder or find the code elsewhere. There are several geocoder APIs and some geocoders are faster than others.

The Geocoding API of Google Maps This is a common option and this is the API we will call in the easy option. However, you can also work directly within Excel. Armed with the code you have written or discovered, here are the steps to implement geocoding in Excel.

The hard way

  1. Step 1:look for the tab Developer in your version of Excel.
  2. Step 2:look for the tab «Visual Basic«This opens the development window.
  3. Step 3:Insert —> Module. The new module will retain your function.
  4. Step 4: This is where you copy and paste your code.
  5. Step 5:We need to add references now. So, Tools —> References. Make sure to check Microsoft XML v6.0. CLICK ACCEPT.
  6. Step 6:Press CTRL / DCM + S. Save as type —> Excel Add-in. Now you can name your function. The extension has to be xlam. It is time to close all Excel files.
  7. Step 7:Open a new file by following the path below: File —> Options —> Plugins. In the Manage box, choose Excel Add-ins.
  8. Step 8:Press Ir. Choose the function in the window that appears by checking the box. Press
  9. Step 9:Now you could use the new function you created, just like any other function.

NOTE: : Once you're done retrieving the values, copy and paste them somewhere else, outside of the sheet with the calculations. Then, remove the function calls because otherwise, when you open this file again, the Google API will start getting pinged again. That will consume several minutes before the file is opened. To optimize Google's resource usage, take a 10-second break between addresses.

There are a lot of steps, and it's assumed you've found some code to try out. Next, we'll look at the easiest way to geocode your Excel data. It's fast and reliable, but it won't import the coordinates into your Excel file. On the other hand, Excel's geocoding tool is simple to copy and paste and gives you an interactive map.

The easy way (calculate distances between coordinates in Excel when creating a map)

There are several ways to create maps with Excel data. Perhaps the easiest way is to simply copy and paste your spreadsheet data into our map creation tool. Doing so turns your Excel document into a beautiful interactive map.

  1. Step 1:: To make your own map based on latitude and longitude coordinates, separate the coordinates into their own columns within your spreadsheet.

Ways to calculate distances between coordinates in Excel Ways to calculate distances between coordinates in Excel Ways to calculate distances between coordinates in Excel

  1. Step 2:: Then, select and copy the rows and columns of your spreadsheet (Ctrl+C or Cmd+C command in Mac) and Paste (Ctrl+V or Cmd+V on Mac) into your data, and you're done!

You may also be interested in reading about: How to Use the QUARTILE Function in Excel – Complete Guide

Conclusion

As you can see, these are the methods you can use to calculate distances between coordinates in Excel. Whether you want to create a latitude and longitude map or create your own virtual wedding guide for your guests, these processes offer a free and easy way to create beautiful web maps that are ready to save and share. We hope we have helped you with this information.

Leave a comment