MultiGetDistance: Can you skip locations with no valid adress?

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...
Go back to All Questions Login or Register
0
Michael Lohrengel 4 Rep.

Hi There,
thanks for the great GetDistance and MultiGestDistance functions. I have set up a spreadsheet where users can fill in up to 4 locations for one trip. For example I enter A1 “Paris”, B1 “London”, C1 “New York”, D1 “Tokio” and E1 will contain =MultiGetDistance(A1;B1;C1;D1)/1000. That works fine as long as A1:D1 will all hold valid locations. But if a trip will only have 2 locations and C1 and D1 stay blank it does not work anymore. I suppose it should be possible to skip a “faulty” argument in the MultiGestDistance function, but I cant figure out how to do it. Could you please help me out?

Thanks, Michael

Michael Lohrengel asked
×

Login

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