Given a start point, a distance and a heading, it is possible to work out the resulting latitude and longitude. See the maths behind it here. See Radians Versus Degrees for the utility functions we are going to use in this calculation. There's an example of a mashup using this at Urbarama mashup
The variables required to calculate a new lat/lon are
Together, they can be used to create the latitude and longitude of a new point like this
You will find this code in the google apps script mcpher library or in the downloadable cDataSet.xlsm (usefulStuff module), at this gist, and below
You may of course want to do all this in an Excel formula. Here's some data, in this case on Row 5.
new Latitude formula (cell e5)
new Longitude formula (cell f5)
new latitude formula calling VBA function (cell g5)
new longitude formula calling VBA function (cell h5)
Take a look at One Liners for more tips like this. In the meantime why not join our forum,follow the blog or follow me on twitter to ensure you get updates when they are available. You can download this example and all other code in the cDataSet.xlsm from Downloads
You want to learn Google Apps Script?
Learning Apps Script, (and transitioning from VBA) are covered comprehensively in my my book, Going Gas - from VBA to Apps script, available All formats are available now from O'Reilly,Amazon and all good bookshops. You can also read a preview on O'Reilly.
Services > Desktop Liberation - the definitive resource for Google Apps Script and Microsoft Office automation > Integrating Excel with Maps and Earth >