+ Reply to Thread
Results 1 to 2 of 2

Macro or code to calculate the length of time a vehicle spends in a an area

  1. #1
    Registered User
    Join Date
    10-24-2010
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    49

    Macro or code to calculate the length of time a vehicle spends in a an area

    Please can somebody help me, I know that this task can be completed manually, but thought that a macro or code would allow it to be automated.

    I am trying to calculate the length of time a vehicle(s) spends in a an area and enclosed spreadsheet is an example of the data that is exported from the system.

    I have a piece of code that works if the vehicle does not leave the area, but in reality it can leave an return many times over the course of the time period that the data is captured.

    The data has,

    1. the time in column A, the time is generated every time a vehicle enters or leaves the area, so a line of data can be created 2 or 5 minutes or any time after the previous line.

    2. the columns B to ….. contains a vehicle identification. There may be any number of vehicles is the row as the number will increase or decrease as a vehicle enters or leaves the area.

    Thank you in advance for your help.
    Attached Files Attached Files

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Macro or code to calculate the length of time a vehicle spends in a an area

    Is this solved?

    If you solve a problem yourself before anyone else has responded, please take a moment to describe your solution, chances are some other member will benefit.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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