convert to military time in excel
convert to military time in excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 7 of 7

Thread: convert to military time in excel

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    I am having trouble converting time to military time. Excell gives me the choice in format but when I select the format it does not change to military time in the column I am trying to change. The data comes from boxcar pro (a data logger for temperature and time) and is exported to excel. Can anyone out there help me??

  2. #2
    Board Regular
    Join Date
    Feb 2002
    Posts
    3,169
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks to Bill Jelen (MrExcel)

    see

    http://www.mrexcel.com/tip029.shtml
    Free Excel based Web Toolbar available here.

    Jack in the UK
    J & R Excel Solutions
    "making Excel work for you"

  3. #3
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Sydney, Australia
    Posts
    2,936
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default

    What does the data look like as it is i.e. before formatting?

    Dan

  4. #4
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Austin, Texas USA
    Posts
    11,654
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-03 15:12, Roxanne wrote:
    I am having trouble converting time to military time. Excell gives me the choice in format but when I select the format it does not change to military time in the column I am trying to change. The data comes from boxcar pro (a data logger for temperature and time) and is exported to excel. Can anyone out there help me??
    Roxanne, it's quite possible that your values were imported as text (e.g., "17:00"). This can be easily remedied if you'll select the column containing your times, choose the Data | Text to Columns... menu command, and press its [ Finish ] button.

  5. #5
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Denver, CO
    Posts
    1,743
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-03 15:12, Roxanne wrote:
    I am having trouble converting time to military time. Excell gives me the choice in format but when I select the format it does not change to military time in the column I am trying to change. The data comes from boxcar pro (a data logger for temperature and time) and is exported to excel. Can anyone out there help me??
    Excel is probably treating your number as text. If this is the case, two possible fixes are
    1) Select your column. goto data - text to columns and hit finish. Your format should now "stick"
    2) By formula. Put
    =TEXT(A1+0,"HH:MM:ss")
    next to cell A1 and copy it down.

    good luck

  6. #6
    New Member
    Join Date
    Oct 2009
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: convert to military time in excel

    http://www.mrexcel.com/tip029.shtml

    How do I change the event handler code for only one column that is referenced in the above tip?

  7. #7
    Board Regular
    Join Date
    Mar 2007
    Location
    Chicago Area
    Posts
    2,614
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: convert to military time in excel

      
    Quote Originally Posted by ufgatordad View Post
    http://www.mrexcel.com/tip029.shtml

    How do I change the event handler code for only one column that is referenced in the above tip?
    Welcome to the board!

    Where he has under "possible enhancements"

    Code:
    Private Sub Worksheet_Change(ByVal Target As Range)
        ThisColumn = Target.Column
        If ThisColumn < 3 Then
    You can change the "<" to "=" and then it will work only on column C (aka column 3).

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com