+ Reply to Thread
Results 1 to 8 of 8

Help! Time Value - Removal of Seconds

  1. #1
    Registered User
    Join Date
    01-05-2015
    Location
    Wisconsin
    MS-Off Ver
    2013
    Posts
    50

    Help! Time Value - Removal of Seconds

    Is there any way to remove the seconds from the TimeValue? It displays as 23:59:00; but I'd like 23:59. Also, is there a way to calculate the value of two ComboBox's?

    Please Login or Register  to view this content.
    Thanks in advance.
    Last edited by ocnmel; 01-07-2015 at 12:47 PM. Reason: Added Code Tags

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Help! Time Value - Removal of Seconds

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    01-05-2015
    Location
    Wisconsin
    MS-Off Ver
    2013
    Posts
    50

    Re: Help! Time Value - Removal of Seconds

    Thanks, Shg! I modified For i = 1 To 1439 and it works perfect.

    Would you happen to know how to calculate the value of two or more combobox's? For example, if ComboBox23 is 23:00 and ComboBox24 is 05:00; is there a formula that could calculate the number of hours between the two? And, also on off hours like 05:01 to 17:16?

    Thanks in advance.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Help! Time Value - Removal of Seconds

    calculate the number of hours between the two?
    TimeValue(ComboBox23) - TimeValue(ComboBox24)

  5. #5
    Registered User
    Join Date
    01-05-2015
    Location
    Wisconsin
    MS-Off Ver
    2013
    Posts
    50

    Re: Help! Time Value - Removal of Seconds

    Hmm! I can't get the above to calculate the number of hours between two. I added it to my code - but perhaps, I'm doing something wrong. I have 4 in times and 4 out times, and I'd like each in/out time to calculate together and then all 4 in/out times be added together as total hours together that calculates with military time and with the minutes...

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Help! Time Value - Removal of Seconds

    To get decimal hours,

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    01-05-2015
    Location
    Wisconsin
    MS-Off Ver
    2013
    Posts
    50

    Re: Help! Time Value - Removal of Seconds

    Shg,

    Here's a copy of my worksheet to show you what I am experiencing. Timecard - In-Out.xlsm.

    I have linked the ComboBox cells in the properties for cells B11 - B18 and I'd like to calculate all 8 in/out times in B19-H19 and J19-P19. I keep getting a decimal and I'd like to get the total number of hours input and round down (to the nearest quarter hour) if the hours are less than the nearest quarter hour. For example, if the employee has a total of 9 hours, 14 minutes or 9:14 total - the formula would round down to 9:00 hours.

    Thanks in advance for your assistance.

  8. #8
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Help! Time Value - Removal of Seconds

    See the following test code that rounds down time in 15 minute intervals.
    Please Login or Register  to view this content.
    Complete implementation at: http://www.excelforum.com/excel-prog...ml#post3962378

    Lewis

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Date/Time stamp removal
    By mungel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-10-2013, 07:07 AM
  2. Duplication removal with condition...please help, I don't have much time left...
    By Mel Shad in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-17-2013, 12:19 AM
  3. Filtering time from 1 seconds into 10 seconds
    By Deane in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 05-30-2010, 09:48 PM
  4. Convert "Time Interval" in "hours : minutes : seconds" to seconds
    By deano27 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-28-2008, 09:07 AM
  5. Replies: 7
    Last Post: 05-08-2005, 04:06 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