+ Reply to Thread
Results 1 to 7 of 7

How to calculate movement

  1. #1
    Registered User
    Join Date
    09-11-2013
    Location
    New Zealand
    MS-Off Ver
    Excel 2007
    Posts
    4

    How to calculate movement

    I have this spreadsheet (about 25000 rows) too many to do manually.
    There are 3 columns - dd/mm/yyyy - hh:mm:ss - Direction
    In the direction column there are 2 options BA and AB.. These are traffic counters..

    So I would like some help with calculating the time it took for a car to drive over these counters.. When the time is more than 20 seconds, the car went into a yard.
    However as you can see from the attached spreadsheet it isn't a simple formula. Well for me anyway.

    So can someone help me with calculating the time, bearing in mind the different directions.

    Thanks heaps
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: How to calculate movement

    Hi
    how do you identify a single car, to know which values to subtract?

  3. #3
    Registered User
    Join Date
    09-11-2013
    Location
    New Zealand
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: How to calculate movement

    with time. from counter to counter is about 20 seconds.. everything over that is another car

  4. #4
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: How to calculate movement

    ok ...
    if 2 cars in succession go into a yard, how do you tell which one leaves first;
    if 2 cars pass the start point at about the same time, how can you tell whether they overtook
    if one car leaves the yard at about the same time another is passing, how can you tell which passes the second counter first

    or don't these matter much

  5. #5
    Registered User
    Join Date
    09-11-2013
    Location
    New Zealand
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: How to calculate movement

    You can't overtake at that point.. and yes 2 cars in succession can go into the yard but I am not worried which one leaves first. I'm sure it can be done but I'm kinda pulling my hair out how it can be done

  6. #6
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: How to calculate movement

    ok try this
    sort your data first on column "direction" then ascending on the time column
    this will separate your AB from your BA directions and give you successive observations for each direction

    separately for the ABs and BAs

    type "start" against the FIRST trip for each direction in column S (10:52:40 for AB and 10:52:33 for BA in your example)

    in the cell below (S30 in my working, you may need to tweak) type this formula:

    Please Login or Register  to view this content.
    copy this formula to the remaining rows for all the ABs and BAs



    this says:
    if the previous row is not the start of the journey, this row is the start of the journey
    if this row is not the start of the journey, and the trip took more than 20 seconds, it went into the yard
    if this row is not the start of the journey, and the trip took less than 20 seconds, return the time taken

    is this roughly what you want?
    Last edited by NickyC; 09-11-2013 at 11:48 PM. Reason: typos

  7. #7
    Registered User
    Join Date
    09-11-2013
    Location
    New Zealand
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: How to calculate movement

    I will have to check with my friend tomorrow but it looks fine to me.
    Thanks heaps

+ 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. How do I calculate rank movement?
    By speedbird168 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-05-2013, 07:34 AM
  2. cell movement
    By stevesunfold in forum Excel General
    Replies: 2
    Last Post: 10-01-2008, 12:59 PM
  3. change the tab movement
    By T De Villiers in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-04-2008, 01:52 PM
  4. Cursor Movement
    By Paige in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-03-2006, 07:55 PM
  5. movement
    By Ross in forum Excel General
    Replies: 6
    Last Post: 09-25-2005, 09:05 AM

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