+ Reply to Thread
Results 1 to 3 of 3

Problems with text to columns/time formatting

  1. #1
    Registered User
    Join Date
    01-05-2010
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2007
    Posts
    2

    Question Problems with text to columns/time formatting

    Hi all,

    I'm hoping you can help me. I've got some time values in an Excel Sheet in the format hh:mm:ss. I need to split them into columns (including the colon) like below:

    hh: | mm: | ss

    I can do this manually using text to columns but when I use text to columns in my macro, it automatically changes the time format to h:mm:ss PM

    I've posted my code below - my apologies if this is on the wrong forum etc

    Please Login or Register  to view this content.

    Thanks very much!

    Caz
    Last edited by carrielovesfanta; 01-06-2010 at 12:38 PM. Reason: adding code tags

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Problems with text to columns/time formatting

    You could use formulas to draw out the same values without having to fiddle with the original cells:

    =HOUR(A1)
    =MINUTE(A1)
    =SECOND(A1)

    Then copy/pastevalues to remove the formulas. That could be made into a macro as well.
    Last edited by JBeaucaire; 01-06-2010 at 01:15 PM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    01-05-2010
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Problems with text to columns/time formatting

    Quote Originally Posted by JBeaucaire View Post
    You could use formulas to draw out the same values without having to fiddle with the original cells:

    =HOUR(A1)
    =MINUTE(A1)
    =SECOND(A1)

    Then copy/pastevalues to remove the formulas. That could made into a macro as well.
    Hi, thanks for the reply - I think you're right in that I'm going to have to appraoch this from a different angle. I'll use the hour, min, sec formulae you suggested.

    Thanks again!

    Caz

+ 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