+ Reply to Thread
Results 1 to 5 of 5

logbook help

  1. #1
    Registered User
    Join Date
    06-21-2009
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    logbook help

    hi guys,

    I have created a simple vehicle logbook. (see atatchment)

    Manually enteering into the 'logbook' tab... Date into column A, Location 'From' in Column B, location 'To' in column C.

    Columns D & E are calculations simply combining the data in columns B & C, column D is B + C, and column E is columns C + B. This data is used in the 'lookup table' tab.

    Columns F & G are then automatically populated using if...then and vlookup functions from the 'lookup table' tab.



    In the 'lookup table' tab i can then manually enter the 'from' 'to' 'distance travelled' and 'toll cost'. and the 'logbook' can then determine the distance travelled in either direction. This part works fine.


    As an extension of this, what i want to do is try to identify the 3 & 12 month periods where i have travelled the most distance. I would like this to be displayed in the 'max distance travelled' tab with the date range and the distance.

    My problem is that as the amount of entries for any given day is not identical, i am not sure if this can be done.

    Any help would be greatly appreciated.

    Thanks

    Grant
    Attached Files Attached Files

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097

    Re: logbook help

    Hi,

    It's password protected
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Registered User
    Join Date
    06-21-2009
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: logbook help

    oops...try this one then!
    Attached Files Attached Files

  4. #4
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097

    Re: logbook help

    Hi,

    Does this work for you?

    In B3 of Max distance travelled

    =DATE(YEAR(A3),MONTH(A3)+3,DAY(A3)) then in C3

    =VLOOKUP(B3,Logbook!A:J,10,TRUE)-VLOOKUP(A3,Logbook!A:J,9,TRUE)

    Then B9

    =DATE(YEAR(A9),MONTH(A9)+12,DAY(A9)) then in C9

    =VLOOKUP(B9,Logbook!A:J,10,TRUE)-VLOOKUP(A9,Logbook!A:J,9,TRUE)

  5. #5
    Registered User
    Join Date
    06-21-2009
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: logbook help

    that works fine, thanks

    Short of copying this formula down for every day of the year, to find the date range with the maximum distance travelled. would there be a function or code that would automatically find the 3 month range in which the maximum distance was travelled? same with 12 month period.

    Keeping in mind that a 'month' does not necessarily need to begin on the 1st. (i.e. essentially we are talking about a '~90' day period (depending on the number of days in the month.)

    Thanks

    Grant

+ 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