Excel formula to calculate the distance between multiple points using lat/lon coordinates

I'm currently drawing up a mock database schema with two tables: Booking and Waypoint.
Booking stores the taxi booking information.
Waypoint stores the pickup and drop off points during the journey, along with the lat lon position. Each sequence is a stop in the journey.
How would I calculate the distance between the different stops in each journey (using the lat/lon data) in Excel?
Is there a way to programmatically define this in Excel, i.e. so that a formula can be placed into the mileagecolumn
(Booking table),
lookup the matching sequence (via bookingId)
for that journey in the Waypointtable
and return a result?
Example 1:
A journey with 2 stops:
1 1 1 MK4 4FL, 2, Levens Hall Drive, Westcroft, Milton Keynes 52.002529 -0.797623
2 1 2 MK2 2RD, 55, Westfield Road, Bletchley, Milton Keynes 51.992571 -0.72753
4.1 miles according to Google, entry made in mileage column
in Booking table
where id
= 1
Example 2:
A journey with 3 stops:
6 3 1 MK7 7DT, 2, Spearmint Close, Walnut Tree, Milton Keynes 52.017486 -0.690113
7 3 2 MK18 1JL, H S B C, Market Hill, Buckingham 52.000674 -0.987062
8 3 1 MK17 0FE, 1, Maids Close, Mursley, Milton Keynes 52.040622 -0.759417
27.7 miles according to Google, entry made in mileage column
in Booking table
where id
= 3
I understand that 100% accuracy is not possible, so it will not be an issue.

http://www.cpearson.com/excel/LatLong.aspx
and
http://www.contextures.com/excellatitudelongitude.html

Similar Messages

  • How to get Basic salary amount in the Housing formula to calculate the housing value as I used the DBI (NICDP_EMPLOYEE_BASIC_SALARY_AMOUNT_ASG_ENTRY_VALUE) but when run the Quick pay for the housing element alone result come 0, How to get Basic salary amo

    How to get Basic salary amount in the Housing formula to calculate the housing value as I used the DBI (NICDP_EMPLOYEE_BASIC_SALARY_AMOUNT_ASG_ENTRY_VALUE) but when run the Quick pay for the housing element alone result come 0, How to get Basic salary amount in the Housing formula to calculate the housing value as I used the DBI (NICDP_EMPLOYEE_BASIC_SALARY_AMOUNT_ASG_ENTRY_VALUE) but when run the Quick pay for the housing element alone result come 0

    Hi,
    Is your formula attached to basic salary element or some other element? You need to make sure that basic salary element has some value and is processed before this formula is called. Are you able to see value for basic salary element after payroll run?
    Regards,
    Pawan

  • Hi frnds need to calculate the distance

    hi frnds,
    In siebel am in need of Calculating the distance between two zipcodes using the latitude and longitude with the help of a table provided without integration, can any one help me out with dis requirement ..thanks

    Hi Virginie,
    Check both feature PFREQ (Edit with transaction PE03) and user-exit corresponding to enhancement PARA0001.
    rgds,
    Carlos.

  • Customizing distance between data Points on x-Axis

    Hi,
    I want to draw a LineChart.
    I have these Timestamps [84, 1000, 34000, 34699, 439999] who
    are represanting the x-Value of DataPoints along the X-Axis.
    Unfortunately the distance between 2 datapoints along the
    x-Axis is always the same, that means that between the points with
    x-values 84 and 1000 is the same distance along the axis as between
    the points with x-values 34699 and 439999.
    But the distance between points with x-values of 34699 and
    439999 should be much greater than between 84 and 1000.
    How can I customize the distance between data Points on a
    LineChart to solve my Problem?
    I really dont know right now!
    Greeting,
    Z.

    "zidaninho" <[email protected]> wrote in
    message
    news:gls479$nkt$[email protected]..
    > Hi,
    >
    > I want to draw a LineChart.
    > I have these Timestamps [84, 1000, 34000, 34699, 439999]
    who are
    > represanting
    > the x-Value of DataPoints along the X-Axis.
    >
    > Unfortunately the distance between 2 datapoints along
    the x-Axis is always
    > the
    > same, that means that between the points with x-values
    84 and 1000 is the
    > same
    > distance along the axis as between the points with
    x-values 34699 and
    > 439999.
    > But the distance between points with x-values of 34699
    and 439999 should
    > be
    > much greater than between 84 and 1000.
    >
    > How can I customize the distance between data Points on
    a LineChart to
    > solve
    > my Problem?
    >
    > I really dont know right now!
    What happens if you convert the time stamps to Dates and use
    a DateAxis?

  • Command for calculating the difference between channel points

    Hello guys,
    Please tell me if there is a command (or a way) to calculate the diference between channel points, and when there is a diference between points greater then a certain value, to give you where are those points.
    I record some CSV data, a force during time and travel, and I want to put on a graph the exact value when I have a decrease of force greater then 0,1N.
    Thank you again for your time.
    Solved!
    Go to Solution.

    Hello again,
    I find out about the ChnDeltaCalc command, and I combine it with ChnFind and ChD commands and everything is OK.
    Have a nice day.

  • Getting the length between two points

    Hi All,
    I am trying to get the distance between two points and came across the SDO_LENGTH function in the manual - however there is no example on how to use it.
    I was expecting the following statement to return me the value 9 but instead I am getting errors along the lines of SDO_GEOM.SDO_LENGTH must be declared etc.
    =============================================
    SDO_GEOM.SD0_LENGTH(
    MDSYS.SDO_GEOMETRY(2
    ,NULL
    ,NULL
    ,MDSYS.SDO_ELEM_INFO_ARRAY(1,2,1)
    ,MDSYS.SDO_ORDINATE_ARRAY(1,1,10,10))
    ,MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',-180,180,0.0001)
    ,MDSYS.SDO_DIM_ELEMENT('Y',-90,90,0.0001))
    ============================================
    what am I missing
    any help appreciated
    Brent Glover

    I think I have found my answer
    ============================================
    DECLARE
    v_length NUMBER;
    BEGIN
    v_length := SDO_GEOM.SDO_LENGTH(
    MDSYS.SDO_GEOMETRY(2
    ,NULL
    ,NULL
    ,MDSYS.SDO_ELEM_INFO_ARRAY(1,2,1)
    ,MDSYS.SDO_ORDINATE_ARRAY(1,1,10,10))
    ,MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',-180,180,0.0001)
    ,MDSYS.SDO_DIM_ELEMENT('Y',-90,90,0.0001))
    DBMS_OUTPUT.put_line(v_length);
    END;
    =============================================

  • Distance between all points

    Hi all, I am trying to find the distance between all points in an array. I was able to get the all possible combinations but i am not getting the expected ouput.
    For eg, if i have four points, total number combinations are going to be 6 and i want to find distance in all six combinations.
    Please help me where i did mistake. Please find the attached vi.
    Thanks
    uday,
    Please Mark the solution as accepted if your problem is solved and help author by clicking on kudoes
    Certified LabVIEW Associate Developer (CLAD) Using LV13
    Solved!
    Go to Solution.
    Attachments:
    Find distance between all points.vi ‏17 KB

    Try something like this.
    Since I don't have the IMAQ function, I am using complex data for each point, but it would be trivial to adapt it to your data structures instead.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    Find distance between all points.png ‏33 KB
    Find distance between all pointsMODCA.vi ‏10 KB
    Find distance between all pointsFP.png ‏21 KB

  • How to use the 'Decision between multiple alternatives' Process variant

    Hi ,
    Can anyone tell me how to use the 'Decision between multiple alternatives' Process variant in BI 7 Process chains ?
    The requuirement is that I have a DSO eg DSO 1 from which i have to load DSO 2 and DSO 3 . Now if the number of Records in DSO 1 are < 100 i will load DSO 2 from DSO 1 else i will load DSO 3 from DSO 1 .
    So in the PC i have used a 'ABAP Program' variant (which counts the number of rows in DSO 1) after loading DSO 1 and  after this 'ABAP Program' Variant , i have used the 'Decision between multiple alternatives' Process variant. Problem is it is giving me only some some system fields in the formula , like sy-datum or sy-timlo , which are of no use here .
    It would be great if i can receive some help here .
    --Devraj

    in RSPC you create a ABAP processing type "ending with specific values".
    We use true or false for things as you specify.
    your abap program should return a true or a false to indicate which of the situations is applicable.
    Is this helpful?
    Marco

  • How to Calculate the Space between two Characters in GDI + ?

    I am Drawing the set of characters in Graphics, by Calculating the points using GraphicsPath for each Character. I Need to know how to calculate the distance should be given between the two characters?
    I am using this code to generate points
    PointF [] pnts;
    var p=new GraphicsPath();
    path.AddString("A","Arial",(int)FontStyle.Regular,50,new pointF(0f,0f),StringFormat.GenericDefault);
    Matrix m=new Matric(1,0,0,1,0,0);
    path.Flatten(m,1,0f);
    pnts=path.pathpoints;
    i am getting the points for all characters using the above code.
    Now i am combining the two character Using the points generated by the above code.  Eg "AB"
    Help me to calculate the the character space should be given between two characters?
    Thanks in Advance...

    Hi,
    this link can assist you:>
    Professional C# - Graphics with GDI+ 
    Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP]

  • Calculate the difference between two dates times in infopath form 2013

    Hi,
    I have an infopath 2013 form that contains three fields:
    2 date time and the 3rd contains the difference between the two in hours
    how I can make the difference between the two so that the display will be like this:
    Date Time1           08/21/2014           22:00 
    Date Time2           08/22/2014           1:00
    Diff Field                                             3:00

    Hi,
    Please refer to the following article which matches your requirement exactly.
    Calculate the difference between two date picker controls in InfoPath using rules and formulas - no code!
    Please mark it answered, if your problem resolved.

  • Calculate the variance between two row

    Post Author: jane
    CA Forum: WebIntelligence Reporting
    Hi,
    I'm new to BO and wondering whether there is a way to calculate the variance between two rows. I'm working on a report which requires to display the change of two day's data. For instance, I have a table in a format as
    Date
    Sales Amount
    3/12/2008
    2300.00
    2/12/2008
    1280.00
    Changed
    1020.00
    I'd like to display the "Changed" column. Is there a way to do that in BO InfoView? In Excel, you can use the formular by identify the two cells.
    Thanks!

    Post Author: Vinl
    CA Forum: WebIntelligence Reporting
    I am having the same problem and am steping outside of the box and cannot progress.
    Seems to me that you are kind of saying that the only way to get around this is to create an individual object in Designer? I cannot find a way of cementing values as a variable in order for a variance to be created.
    I am trying to do it at column level mind you, which should not make that much difference....
    Simple SQL database. I have created an object called "Year" which takes a date and converts it to a year. I then have another object created "Total sales", put the 2 in a table get the right results...try and create a year on year variance from that...no chance...
    Used to work ok...?

  • How can I calculate the delta between 2 cursors on an xy graph

    I have an xy graph with two sets of cursors: cursor0 and cursor1. I want to calculate the delta between cursor0 y position and cursor1 y position. I have created a cursor y position property node that gives me the y position of cursor1, but how do I get the y position for cursor0? There does does not seem to be any mechanism for selecting which cursor the property node references.
    Thanks
    John

    There is a more rapid solution : you can read all the cursors attributes in a single property node call, then extract the info you need, as shown in the attached picture.
    Message Edité par chilly charly le 08-29-2005 09:24 PM
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Example_BD.png ‏2 KB

  • How do I cancel the distance between the numbers? I'm having trouble copy phone numbers from the phone book and send it via SMS This problem I've found in the Arabic language, numbers appear in reverse Please help System 6.0.1

    How do I cancel the distance between the numbers?
    I'm having trouble copy phone numbers from the phone book and send it via SMS
    This problem I've found in the Arabic language, numbers appear in reverse
    Please help
    System 6.0.1

    MPEG-4 should not be used in FCP unless it is converted first or optimized in the application.
    Trash your preferences. Trash your project render files. Switch off background rendering. Do not re-render. Export your projects.
    Ignore the last frame and first frame indicators.

  • Is there any css to vary the distance between two items in apex

    Hi,
    Is there any css to vary the distance between two items ie two columns  horizontally / vertically in apex application at page line level
    Regards,
    Pavan

    Hi ,
    I done what u suggested above  but  i ll tel u clearly
    i have name,plot no,street,city,distict,state,country,phone no,pincode items.. i need to align this items like
    --------------------------------------------------------------------------main region----------------------------------------------------------------------------
    --left region-------------------------------------------middle region------------------------------------------------------right region-------------------
    name,___________
    plot no,_________
    street,________
    city,___________                                    distict,_________                                              
    state,__________                                   country,_________                                                  nothing in it
    phone no,__________                              pincode_________
    to achieve this wat i have to do
    Thanks,
    pavan

  • MDX - how to calculate the sales between a certain period and the currentmember with a max date

    Hi all,
    1)I need to calculate the sales between W1 and the currentmember, but the max date should be W20. How can I solve this in MDX?
    MEMBER [Measures].[Q1 act.period to date sales] AS
    Sum(
    [Date invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[1]
    [Date invoice].[Bonus calendar - Week].Currentmember
    *[CurrentSalesPeriod]
    ,[Measures].[Sales amount]
    This is the measure I have, I need to add the max date is W20. 
    2)Also, when I calculate the sales between [Date invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[40] and the currentmember, for example being [Date invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[20],
    he calculated the sales between this period. However, in theory this is not possible because W20 < 40. Is there any way I can put a constraint on this that he only calculates the sales if the currentmember is > the start period?
    Thanks in advance!

    Y, you can put a check on to determine if currentmember > start period.
    Firstly, your period keys are composite of year and period (indicated by the two ampersands in the fully qualified date above). If your period keys were non-composite (eg 201501) it would be a simple matter of 
    IIF([Date invoice].[Bonus calendar - Week].Currentmember.properties("key") > [Date
    invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[1].properties("key"),[Measures].[Sales
    amount],null)
    There are advantages of having two period attributes on the dimension, one with a fully unique
    key and the other with just the period of fy, but that's digressing.
    With your composite keys, you could use a calc like the following for the SUM()
    Sum(
    [Date invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[1]
    [Date invoice].[Bonus calendar - Week].Currentmember
    *[CurrentSalesPeriod]
    ,IIF([Date
    invoice].[Bonus calendar - Week].Currentmember.parent.properties("key") +[Date
    invoice].[Bonus calendar - Week].Currentmember.properties("key") > [Date
    invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[1].parent.properties("key")+[Date
    invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[1].properties("key"),[Measures].[Sales
    amount],null))
    Richard

Maybe you are looking for

  • How to reset display resolution on a MacBook Pro

    Hi, My MBP 15.4 /2.4GHz display is stuck at a low colour display and I am unable to get it back to normal. I was working in MS Remote Desktop Connection, switched into OS X's Universal Access in System Preferences and that's when the fun started. I'v

  • During Excise invoice capturing, BED and other duties not coming

    Hi experts, During Excise capturing with j1iex_c t-code for scheduling w.r.t. scheduling agreement, BED and other excise duties are not coming automatically. But in case of other scheduling agreements all the duties are coming l...what could be the r

  • How do I repair a file read error

    I have a file that refused to be backed up in my nightly backup (I'm using Carbon Copy Cloner).  I suspect that the disk may be corrupted somewhere in that file's allocated space, but running Disk Utility from Option+Reboot does not show any errors f

  • Render always fails

    I'm trying to render a project of about 1 hour long, and it always fails. If render from Premiere Pro, I get a dialog box that just says: "Error rendering project unknown error" If I try to render from Adobe Media encoder, I get tthe following logs.

  • Deployment Tool Error - unknown document type - Add to Application EJB jar

    I am creating a new application in the J2EE deployment tool and adding an EJB JAR to it. The jar contains the ejb-jar.xml file. This file has the standard doctype: <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, INC.//DTD Enterprise JavaBeans 1.1//EN'