Sunday 15 September 2013

Excel Mileage Add-in - Updated

Sometime ago I wrote an Excel add-in to help the business user calculate time and distance between postcodes. I did this as I was fed-up of having to keep referring to Google Maps to work out distances for my business mileage.

I have updated the add-in to make it more stable and to provide further functionality. The add-in works with Excel 2010 and above (I have not tried earlier versions as I don't have the software).

The functions and usage are as follows:


Function

Description

GetKilometers(from,to)

Gets kilometres between two postcodes

GetMiles(from,to)

Gets miles between two postcodes

GetLatitude(from,to)

Gets Latitude for postcode e.g. NN14 2JD = 52.4472546

GetLongitude(from,to)

Gets Longitude for postcode e.g. NN14 2JD = -0.82291

GetJourneyTime(from,to)

Gets duration in hours and decimal of hours e.g. 1.2 is actually
1hr 12mins N.B.

GetDirections(from,to)
Gets a list of driving directions between two postcodes

GetJourneySummary(from,to)

Gets a summary of the journey between two postcodes in duration and distance.


GetMapUrl(from,to)
Gets a Google Maps url showing the route map of journey


Please remember: these functions will ONLY work with UK postcodes.

An example: =GetMiles("NN147RJ","ST52SL") will return 108.01 miles.

***The postcodes need to have quotes around them as above***

The installation is easier than it was. Just download the file and unpack it. Open Excel and go to File>Options>Add-Ins. Click on the 'Go..' button at the bottom and then browse for the XLL file you unpacked from the archive - the rest is straight forward.

You can download the new file from here: Excel_Addin

2 comments:

  1. The addin is very helpful but excel crashes only after a few calculations.

    ReplyDelete
  2. It doesnt work on my excal, r there anything i did wrong caused this ?

    ReplyDelete