+ Reply to Thread
Results 1 to 7 of 7

Two postcodes on databse to return distance?

  1. #1
    Registered User
    Join Date
    02-02-2015
    Location
    Cornwall, England
    MS-Off Ver
    2010
    Posts
    13

    Two postcodes on databse to return distance?

    I am creating a 'Mileage Calculator' in order to deduce the reimbursable miles employees drive per week. I am using Excel and have a database of all the possible 'A-B' combinations of our local postcodes (UK), and the distance in miles between each once, for example: | PL34 0ES | PL34 0AT | 0.7 |. The user, on a different sheet, selects a starting postcode and a finishing postcode for each of the journeys from a drop down list. What formula would I use to display the distance from the database as a result of the two input postcodes? Any help MUCH appreciated. Been trying to sort this all week

  2. #2
    Registered User
    Join Date
    03-21-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Two postcodes on databse to return distance?

    I am trying to do a similar thing to calculate driving time from point a to point be where both are variable. was trying to do it via VLOOKUP but would need to put every variable in 2 columns instead of the table I have. I currently have 80 locations I need to know driving time between.

  3. #3
    Registered User
    Join Date
    02-02-2015
    Location
    Cornwall, England
    MS-Off Ver
    2010
    Posts
    13

    Re: Two postcodes on databse to return distance?

    I think this may be of some assistance to you Grant. http://www.doogal.co.uk/DrivingDistances.php

  4. #4
    Registered User
    Join Date
    06-27-2008
    Location
    Durban, SA
    Posts
    14

    Re: Two postcodes on databse to return distance?

    Here's what I would do:
    In the database tab, you probably have a column for point A postcode, and a column for point B postcode, and a column for the mileage between.
    Create a colum that combines column A and B - something like =A2&"-"&B2 . This will create a cell with both postcode separated by a dash (a unique reference)
    In the user sheet, do the same thing to combine the two inputs into one unique reference.
    Then do a vlookup on this unique reference in the database tab, to return the mileage.

  5. #5
    Registered User
    Join Date
    02-02-2015
    Location
    Cornwall, England
    MS-Off Ver
    2010
    Posts
    13

    Re: Two postcodes on databse to return distance?

    Hi hardbody, posted this link and it has a copy of my spreadsheet, I don't suppose I could be really cheeky and ask you to have a look at it to help me better understand what you mean? http://www.excelforum.com/excel-gene...-database.html

  6. #6
    Registered User
    Join Date
    06-27-2008
    Location
    Durban, SA
    Posts
    14

    Re: Two postcodes on databse to return distance?

    Copy of Mileage calculatorsam (1).xlsxTry this - I've also linked postcodes to the start and finish columns in the calculator.

  7. #7
    Registered User
    Join Date
    03-21-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Two postcodes on databse to return distance?

    Cheers guys, that unique refrence really helps although I now have 6162 refrences I need to work out time and distance data for

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Distance to many UK postcodes
    By samcdavies in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-09-2014, 12:13 PM
  2. Excel SpreadSheet to Calculate the Distance between UK postcodes
    By RachaelDonelon in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-10-2012, 05:08 AM
  3. Distance between UK postcodes
    By peterpcu in forum Excel General
    Replies: 13
    Last Post: 12-31-2011, 12:11 PM
  4. VBA to calculate distance between Uk Postcodes - Urgent help
    By JasonHopkins in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-22-2011, 12:26 PM
  5. [SOLVED] How do I calculate the distance between 2 postcodes?
    By Rhys in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-07-2006, 03:30 PM

Tags for this Thread

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