+ Reply to Thread
Results 1 to 3 of 3

calculate time difference

Hybrid View

  1. #1
    Registered User
    Join Date
    03-15-2013
    Location
    France
    MS-Off Ver
    Excel 2010
    Posts
    7

    calculate time difference

    hello

    I need a vba macro which can calculate the difference between 2 hours

    the problem is that I have the date in column A and the hour hh:mm:ss in column c

    so I need the difference between every 2rows but calculating the date too

    for exemple if I have

    12 march 2013 11:55:00 PM

    13 march 01:00:00 AM that the macro turns 65 mins

    I need a macro and not a formula because ever difference gonna be used after that to compare other things

    I read that datediff exist but it works only for hours or date and hour if they are in the same cell and that is not my case



    thank u
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    01-03-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    163

    Re: calculate time difference

    Hi nancy3822

    Please check attached file.
    I'm not sure, if this is, what you are looking for and probably the code isn't perfect (maybe someone better experienced guys can code it better way), but I hope you'll find it somehow helpful.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    03-15-2013
    Location
    France
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: calculate time difference

    Quote Originally Posted by Sbarro79 View Post
    Hi nancy3822

    Please check attached file.
    I'm not sure, if this is, what you are looking for and probably the code isn't perfect (maybe someone better experienced guys can code it better way), but I hope you'll find it somehow helpful.

    Thank u sbarro

    It is exactly what I need. I was trying to do it very long time thaaaaaanksssssss

+ 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