+ Reply to Thread
Results 1 to 14 of 14

Converting Numeric Values (hhmmss) to Times with via

  1. #1
    Registered User
    Join Date
    03-08-2010
    Location
    Sweden
    MS-Off Ver
    MS Office 365 Mac and Windows
    Posts
    94

    Converting Numeric Values (hhmmss) to Times with via

    Hello Forum
    I have a column with numeric values for time looking like following with wanted result in ():
    429 (00:04:29)
    501 (00:05:01)
    758 (00:07:58)
    831 (00:08:31)
    954 (00:09:54)
    1029 (00:10:29)
    1526 (00:15:26)
    1941 (00:19:41)
    5958 (00:59:58)
    10318 (01:03:18)
    10620 (01:06:20)

    I use below code that originally was for hh:mm but I need seconds as well so added iSec.
    What do I do wrong here? I can't get it to show the correct time as the calculation is wrong somehow..
    Thanks

    Please Login or Register  to view this content.
    Last edited by soreno; 08-21-2018 at 06:42 PM.

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Converting Numeric Values (hhmmss) to Times with via

    Try
    Please Login or Register  to view this content.
    - Battle without fear gives no glory - Just try

  3. #3
    Registered User
    Join Date
    03-08-2010
    Location
    Sweden
    MS-Off Ver
    MS Office 365 Mac and Windows
    Posts
    94

    Re: Converting Numeric Values (hhmmss) to Times with via

    @PCI
    I got "Run-time error '6': Overflow" and it stops at
    Please Login or Register  to view this content.
    it runs thru about 700 rows then stop...

  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: Converting Numeric Values (hhmmss) to Times with via

    How about just a formula?

    429
    0:04:29
    B2: =--TEXT(A2, "0\:00\:00")
    501
    0:05:01
    758
    0:07:58
    831
    0:08:31
    954
    0:09:54
    1029
    0:10:29
    1526
    0:15:26
    1941
    0:19:41
    5958
    0:59:58
    10318
    1:03:18
    10620
    1:06:20
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Registered User
    Join Date
    03-08-2010
    Location
    Sweden
    MS-Off Ver
    MS Office 365 Mac and Windows
    Posts
    94

    Re: Converting Numeric Values (hhmmss) to Times with via

    more convenient with vba or else need new columns and update existing... prefer vba macro if possible...
    Thanks

  6. #6
    Registered User
    Join Date
    03-08-2010
    Location
    Sweden
    MS-Off Ver
    MS Office 365 Mac and Windows
    Posts
    94

    Re: Converting Numeric Values (hhmmss) to Times with via

    I attach a file for use...
    Attached Files Attached Files

  7. #7
    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: Converting Numeric Values (hhmmss) to Times with via

    Please Login or Register  to view this content.
    Last edited by shg; 08-23-2018 at 01:42 PM.

  8. #8
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Converting Numeric Values (hhmmss) to Times with via

    Just change the type
    Is it to do for the selection or for column "A" ?
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    03-08-2010
    Location
    Sweden
    MS-Off Ver
    MS Office 365 Mac and Windows
    Posts
    94

    Re: Converting Numeric Values (hhmmss) to Times with via

    Exellent!!
    Next then... how to implement using range instead of selection, something like...

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    03-08-2010
    Location
    Sweden
    MS-Off Ver
    MS Office 365 Mac and Windows
    Posts
    94

    Re: Converting Numeric Values (hhmmss) to Times with via

    @PCI
    It is actually a range I want to use it with, I have values in two columns H2 and down & I2 and down, can be over 200 000 rows, its part of a code with other things needed so selection is not really the solution here, try to avoid...

    I did test it again with your update and it worked, yes it was probably the selection...

    Thanks
    Last edited by soreno; 08-21-2018 at 06:25 PM.

  11. #11
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Converting Numeric Values (hhmmss) to Times with via

    See next code
    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    03-08-2010
    Location
    Sweden
    MS-Off Ver
    MS Office 365 Mac and Windows
    Posts
    94

    Re: Converting Numeric Values (hhmmss) to Times with via

    @shg I did change your example to this and it seems to work fine

    Thanks

    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    03-08-2010
    Location
    Sweden
    MS-Off Ver
    MS Office 365 Mac and Windows
    Posts
    94

    Re: Converting Numeric Values (hhmmss) to Times with via

    AAhhh!!! I'm more than happy I have choices now to test

    Thanks

  14. #14
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Converting Numeric Values (hhmmss) to Times with via

    Very please to help you
    Shg's code is very nice ...!
    Thx for the rep

+ 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. Converting Numeric Values to English Words
    By h777 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-17-2014, 04:27 PM
  2. [SOLVED] Converting text times to values
    By jankee in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-06-2013, 05:38 AM
  3. [SOLVED] vba macros to force user to input numeric values for numeric values with hyphen
    By Abdur_rahman in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-28-2013, 01:05 PM
  4. [SOLVED] UDF to Vlookup multiple delimited values (numeric/non-numeric) and sum found values
    By Geert Rottiers in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-21-2013, 09:30 AM
  5. Converting alpha-numeric to numeric only
    By rmaier in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 11-12-2012, 01:10 PM
  6. Converting Times to Decimal Values
    By ExcelTip in forum Tips and Tutorials
    Replies: 2
    Last Post: 05-03-2007, 04:22 PM
  7. Converting numeric values in words
    By raj_lacs in forum Excel General
    Replies: 2
    Last Post: 02-19-2006, 09:25 PM

Tags for this Thread

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