Results 1 to 2 of 2

Vba code to get total number of hours

Threaded View

  1. #1
    Forum Contributor
    Join Date
    02-26-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    367

    Vba code to get total number of hours

    Hello,

    I have a userform for a time and motion and I just want to get the total number of hours thru vba code.

    How can I convert the below formula to vba code?

    Ex:

    G2 = 1/16/2014 17:58
    H2 = 1/16/2014 18:01

    In I3, there's a formula: =B2-A2.
    Also, Column I is formatted in Time ( 00:00:00 )

    So it will result I3 = 0:02:57

    I just want to convert the above formula to vba.

    I've attached the file.
    Thanks a lot!
    Attached Files Attached Files
    Last edited by puuts; 01-16-2014 at 06:38 AM. Reason: with attachment

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Adding time in minute/second format together AND an IF formula...
    By KFavulous in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-07-2013, 06:32 PM
  2. [SOLVED] Help with conditional format or time formula
    By interested in forum Excel General
    Replies: 8
    Last Post: 01-08-2013, 12:57 AM
  3. Need a formula to calculate the sum when using the time format.
    By alannanoelle in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-26-2012, 02:02 PM
  4. Conditional Format Time Formula
    By Toonies in forum Excel General
    Replies: 6
    Last Post: 05-10-2011, 09:07 AM
  5. Time format and Formula problems
    By bsacco in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-22-2010, 04:49 PM

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