How to Calculate Distance Between Two Geographic Coordinates in Excel (Example)

Something new can be learned every day, and when it comes to programs whose management is essential to carry out different types of activities and projects, any moment is ideal to understand how important and useful some program tools can be that, perhaps, can be considered basic.

Has he ever made you think about the number of hidden tools and functions in a program? You will surely get a great and positive surprise when you take a look at what an office automation program is capable of doing.

Much more than just numbers

Within the office automation programs, the programs that make up Microsoft Office have always stood out. By far, this package of programs is the most widely used in the world, regardless of the operating system that the computer uses.

The management of these programs has been quite required since its appearance. Although today some have been displaced, others are still as basic as necessary both on your computer and in that of millions of people around the world.

Microsoft Excel is one of those programs that leaves many people speechless. Its interface is simple and basic, it has enormous versatility and a large inventory of formulas that you can easily work with.

A worksheet for distance

Despite being a highly required program for administrative and accounting tasks, the truth is that Microsoft Excel has much more to offer. One of them is the calculation of distances between two points.

worksheet for distance

You can have all the security in the world that the information that you will know here, at some point, will be very useful and you will not regret having read this article and having tried everything that will be indicated here.

What you need to start

You must bear in mind that, anyway, you will need the use of platforms or applications that provide you with certain types of information.

To carry out this information, you will need, for example, the longitude and latitude of both the departure point and the arrival point, information that you can obtain through GPS services such as those available on Google.

The other is that you know that for this, the Haversine equation will be applied, an equation used by the vast majority of GPS systems due to the precision it can have, earning a place in the recommendations of many people.

Structuring variables and constants

Once you run Excel on your computer, it’s time to shape everything you need for the equation. In this sense, you will need four cells for the longitudes and latitudes of the two points, these are called variables. Ideally, take the first cells and give them names, so that:

  • Cell A1 becomes “Latitude1”.
  • A2 becomes “Length1”.
  • B1 becomes “Latitude2”.
  • B2 becomes “Length2”.

On the other hand, for the constants, the following cells will be used to establish the values ​​corresponding to the radius of the sphere to be traversed. In this sense, the cells:

variables and constants

  • C1 will correspond to “RadioMillas”.
    • Enter the value “3959” in this cell.
  • C2 to “RadioKilometros”.
    • Enter the value “6371” in this cell.
  • C3 will be used for data validation.
  • Go to the “Data” tab.
  • Press the “Data validation” button.
  • In the “Allow” section, select the “List” option.
  • Set “Miles, Kilometers” for the validation type.

Formula structure

Once you have the structure of the variables and the constants, and that you have, in turn, the necessary information, it is time to indicate the formula that will help you to perform distance calculation. You can use cell C4 to set the following formula:

  • = ACOS (COS (RADIANS (90-Latitude_1)) COS (RADIANS (90-Latitude_2))
  • + WITHOUT (RADIANS (90-Latitude_1)) WITHOUT (RADIANS (90-Latitude_2))
  • COS (RADIANS (Longitude_1-Longitude2 IF (C3 = “Miles”, RadMiles, RadKilom)

It remains to be verified!

List the formula, it is time to enter the values ​​corresponding to each of the variables and constants to verify that, indeed, the Haversine equation works perfectly in Excel for calculating the distance between two points. On the other hand, you can also learn to calculate and measure distances and complete areas.

How useful did you find this content?

Click on a star to rate!

Average score 0 / 5. Counting of votes: 0

So far, no votes. Be the first to rate this content.

I'm sorry this content was not useful for you!

Let me improve this content!

Tell me, how can I improve this content?

Deja un comentario