+ Reply to Thread
Results 1 to 10 of 10

finding distance from one station to another

  1. #1
    Registered User
    Join Date
    01-29-2015
    Location
    new jersey
    MS-Off Ver
    2010
    Posts
    4

    finding distance from one station to another

    hi everyone i am new to excel i need your help
    i want to make small program. i have 100 stations
    to make it easy instead of stations name i assigned them numbers from 1 to 100 into column A.
    now there is a different distance between those stations from 1 to 100.
    for example station 1 to station 4 distance is 9km and station 1 to station 7 distance is 12km.
    from one station to another station distances vary but that is not more then 100km.
    it means 1 to 100 stations 1 to 100km.

    i want to make a program where i will write starting station in column A and destination
    station in column B. and i want the distance between station A and B in column C.
    Last edited by new1; 01-31-2015 at 08:09 AM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,047

    Re: need help

    HI, welcome to the forum

    Did you take a look at vlookup() ?
    Last edited by FDibbins; 01-31-2015 at 11:34 AM.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    09-18-2014
    Location
    Pakistan
    MS-Off Ver
    2013, 2016
    Posts
    283

    Re: finding distance from one station to another

    use Index or Vlookup Function

  4. #4
    Registered User
    Join Date
    01-29-2015
    Location
    new jersey
    MS-Off Ver
    2010
    Posts
    4

    Re: finding distance from one station to another

    thank you for the quick replies. can you please explain with an example or a formula

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,047

    Re: finding distance from one station to another

    Upload a small (clean) sample of your data and I will show you how it works

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.

  6. #6
    Registered User
    Join Date
    01-29-2015
    Location
    new jersey
    MS-Off Ver
    2010
    Posts
    4

    Re: finding distance from one station to another

    Hi there
    I am attaching a file for example.
    from station to to-station will be in one column I just wrote it here separate column to understand and make it simple and small but in actual its many data from 1 to 100 its like 100x100=1000

    so column A is from station in order from 1 to 100 and column B shows to-station and column C is Distance between column A to column B.
    now the loading pickup tempo will just write from station to to-station that will be in any order. so what I want is from that loading tempo record see attachments Column I when I write the record in give me a answer in column K (distance). so it means just you write a loading tempo record in as it is order and the next column will find you a distance from column A-B-C.
    I have tried my best to explain it and I hope i will get correct formula with example for this.
    Thanks in advance.

  7. #7
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: finding distance from one station to another

    You did not add an excel file we can work in.

    To give you an idea how you can work with this.

    Put the data in the column E - G in column A - C

    Delete the headers and empty rows.

    Add an new column (Column C) and use:
    c3=a3&b3 and drag down.

    The values are now in column D.



    After that
    K4=Vlookup($i3&$I4,$C$3:$d$500,2,0) and drag down.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  8. #8
    Registered User
    Join Date
    01-29-2015
    Location
    new jersey
    MS-Off Ver
    2010
    Posts
    4

    Re: finding distance from one station to another

    Hi,
    I think I have to explain it again
    Attaching you a excel file and Let me explain you again

    column "A" is starting loading station and to make it easy these stations has given
    numbers instead of name (loading station from where all the
    tempo and small trucks will load)

    column "B" is stations where they unload (unload station where tempo and small trucks will unload all)

    Column "c" is actual distance between Column "A" stations to Column "B" stations

    it means Column "A" column "B" and Column "C" is master data to find
    distance between stations ("A" & "B")
    ----------------------------------------------------------------------------

    Now these drivers will write only in their log is start station to next station
    they do not go by Distance record they just go by from station "A" -> to station "B"

    which have given example in column "E"
    they just write it from station to station

    now we have to find answer for Distance between stations which drivers write in their log in Column "E"

    I have found distance answer manually in Column "F" from master data "A" "B" "C"

    -----------------------------------------------------------------------------------------------------------

    I need help for excel formula to make it easy
    the master data which i have wrote is only for example but in actual its large.
    ------------------------------------------------------------------------------------------------------------
    Attached Files Attached Files

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

    Re: finding distance from one station to another

    Try this - simplest way I can think offinding a distance between stations sol.xls

  10. #10
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: finding distance from one station to another

    With VLookup.

    I use an helpcolumn in collumn C.

    See the green cells in column I.

    I get an differant answer in cell I16.

    See the attached file.

+ 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