+ Reply to Thread
Results 1 to 3 of 3

help with =getdistance macro!

  1. #1
    Registered User
    Join Date
    05-09-2012
    Location
    Brighton UK
    MS-Off Ver
    Excel 2010
    Posts
    6

    help with =getdistance macro!

    Hi all,

    I recently set up a macro from another thread - to calculate mileage between 2 postcodes.... http://www.excelforum.com/tips-and-t...rivetimes.html

    Its working pretty well all round, and I even worked out that if you type the postcode as EG : "12345, Germany" ... it will work most of the time for European destinations too

    This is my problem though :

    If it returns an error, I know it hasn't found the postcode and its fine. But for some postcodes - even though it doesn't recognise the postcode - and on Bing Maps it says EG "Do you want to use "Germany" instead....... it doesn't return an error in excel and seems to somehow automatically choose this 2nd option, meaning the mileage is totally wrong.

    Here is an exampe - if I use =getdistance(A1,B1) - where A1 is "75016, France" / and B1 is "29334, France" ...... it returns 177 miles.

    But if you type these into Bing Maps driving distance - which i am pretty sure is where the macro looks.... it doesn't recognise "29334, France" so doesn't display the results immediately.

    Only if you click on the alternative suggestion of "France" does it then pick up the 177 miles.

    I am pretty confident that previously this was returning an error in my formula when examples like this came up - which is what I want. But in this case its returning the unwanted value?

    Any ideas anyone?

    Thanks in advance for your help!

    Jamie

  2. #2
    Registered User
    Join Date
    05-09-2012
    Location
    Brighton UK
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: help with =getdistance macro!

    If it helps..... here's an example where it does what I want it to do - which is return an error if it can't find the postcode :

    "45659, Germany" - "44000, Germany" ........ it returns an error unlike the above example which decides to take the next step and choose "France" instead!

    Maybe its the way the different maps are set up..... just want someone to help confirm it

    Anyone?

  3. #3
    Registered User
    Join Date
    05-09-2012
    Location
    Brighton UK
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: help with =getdistance macro!

    Anyone? Bueller?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1