+ Reply to Thread
Results 1 to 2 of 2

What formula can I use to get closest city out of a list

  1. #1
    Registered User
    Join Date
    05-08-2011
    Location
    Dothan, AL
    MS-Off Ver
    Excel 2003
    Posts
    6

    What formula can I use to get closest city out of a list

    I have a spreadsheet with a list of customers, city, state, zip. I've inserted a UDF to calculate driving distance from a given starting location and ending location. What I would like to do is use a formula so the spreadsheet will calculate and tell me which city in the list is closest to each one. Is this possible? I'd appreciate any help with this.

    The formula I'm using is getGoogDistanceTime(StartLoc,EndLoc,"distance")

    Thanks!

  2. #2
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191

    Re: What formula can I use to get closest city out of a list

    It's probably possible, but we'd need to see a sample of your data, including how you'd like your results. The UDF you created doesn't help us much since only you really know exactly how it works. Also, there will by definition be at least one pair of cities that just lists each other as the closest match and probably several. Do you want all of these pairs listed twice?
    Life is about perseverance. Remember: today's mighty oak tree is just yesterday's nut that held its ground.

    If you like a post, please rate it with the scales icon (top right).
    If you feel really indebted, please consider a donation to charity, such as Feed the Children or Habitat for Humanity.

+ 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