GOOGLE MAPS DISTANCE MATRIX API DOESN’T WORK AFTER CLOSING EXCEL?

1 Star2 Stars3 Stars4 Stars5 Stars (4 votes, average: 4.75 out of 5)
Loading...
Go back to All Questions Login or Register
130 views
0

Hello AnalystCave,

Great code and works like a charm, but I noticed couple of issues when I use the logics:

1. after I close excel and re-open the same excel, and copy the formula to the next row I get an error message stating “#NAME?”
2. When the logic calculates the distance for certain addresses, I get values that don’t really make sense. eg. Distance between S. Green St. 60426 and S. Halsted 60425 in excel states 281.2 miles while google maps state approximately 7 miles.

Is this due to reaching my daily quota of 2500 queries or is there something I am missing that I need to include in the VBA script?

I am a novice to VBA scripting, so trying to understand the driver behind this issue. Any help would be greatly appreciated.

Warm regard,

G

0

Gaurav try to debug the code at the moment when the URL is generate then copy paste this URL to your web browser to see the Google API response. In some cases Google has trouble understanding or mapping the address. Do read Google recommended documentation on how to specify the addresses

Here is an example Google API URL you can use (simply modify the URL with your addresses to see how Google understands your addresses):
Example Distance matrix url

Simply the best place to learn VBA!

Error: Please enter a valid email address

Error: Invalid email

Error: Please enter your first name

Error: Please enter your last name

Error: Please enter a username

Error: Please enter a password

Error: Please confirm your password

Error: Password and password confirmation do not match