Solved

# VBA code for uniform distance between coordinates

Posted on 2011-03-21

Hi experts! I have an Excel spreadsheet with three columns and a large number of rows, a sample of which is shown below. I need to calculate new GPS coordinates a uniform distance between the known values in the table below. I also need to establish a waypoint name using the same scheme (I. E., A name that has a uniform increment for the name between the known values. I have written some VBA code but this one has me somewhat perplexed.

I need VBA code to fill in the blank cells between the coordinates in the table below. Note that the known values below can be greater than or less than the previous values. The intent is to calculate coordinates that are a uniform distance between the known values below. Likewise, the values between the known waypoints need to represent that uniformity.

Since there will always be four rows between the known values, I would like, for example, a routine that works with rows 2 through 7 to calculate the unknown values, and then move down and use the same routine to work with rows 7 through 12, etc.

Thank you in advance for your assistance!

A B C

1 Longitude Latitude Waypoint

2 -76.93283567 42.91389585 E100

3

4

5

6

7 -76.83104584 42.93277324 E105

8

9

10

11

12 -76.41578624 43.08443070 E130

13

14

15

16

17 -76.22519380 43.07906090 E140