+ Reply to Thread
Results 1 to 1 of 1

Date and time compare

  1. #1
    Registered User
    Join Date
    03-23-2005
    Posts
    1

    Arrow Date and time compare

    i have a macro that currently caluclates the start time and end time that a piece of equipment has been run on a specific day, which tells me the total machine run time for that day. Here's what i am attempting to do, is to have the same macro caluclate the start time and end time for a piece of equipement that has been ran on multiple days. So i need it to compare the dates find the min date and max date, take the times between those set of date and give me a total run time. Below is what i have so far can anyone give me advise as to what i need to add to my code in order to do this.....

    'Find Run Start Date
    Range("BB1").Formula = "=Min(C:C)"
    'Find Run End Date
    Range("BC1").Formula = "=Max(C:C)"
    ' Find Start Time and End Time for Each Date
    If Range("BB1").Value = Range("BC1").Value Then
    Range("BF1").Formula = "=min(B:B)"
    Range("BG1").Formula = "=max(B:B)"
    ElseIf Range("BB1").Value < Range("BC1").Value Then
    Range("BF1").Formula = "=min(B:B)"
    Range("BG1").Formula = "=max(B:B)"
    Else
    MsgBox ("Macro can't handle multiple days yet")

    End If

    Thank you for you help
    Last edited by knowledge_619; 03-23-2005 at 05:29 PM.

+ 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