+ Reply to Thread
Results 1 to 11 of 11

Thread: Just want hours and minutes not am and pm

  1. #1
    Registered User
    Join Date
    05-08-2010
    Location
    Virginia, United States
    MS-Off Ver
    Excel 2003
    Posts
    8

    Just want hours and minutes not am and pm

    I am trying to enter just raw hours and minutes into excel. I enter say 1:00 with the cell formatting h:mm, the formula bar still shows 1:00:00 AM. I don't want the AM or PM. Thanks for your help in advance.

  2. #2
    Forum Guru, retired Admin royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    25,637

    Re: Just want hours and minutes not am and pm

    Use a custom format hh:mm

    Format menu -> Cells -> Number -> Custom
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel Tips & Solutions, free examples and tutorials why not check out my downloads

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)

  3. #3
    Forum Guru martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    10,786

    Re: Just want hours and minutes not am and pm

    the fact it shows am/pm is that it matches your system time which is not in your case set to 24 hour clock you need to change the time in regional settings to HH:mm:ss its probably hh:mm:ss tt at the moment
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and a dabbler in Cisco
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Registered User
    Join Date
    05-08-2010
    Location
    Virginia, United States
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Just want hours and minutes not am and pm

    I want to be able to be able add multiple times in terms of hours and minutes. For example, I want to add 1h 25m, 12h 5m to arrive at 13h 30m or 13:30. I tried actually doing it as it is showing (in the formula bar) right now and it works. This seems counter-intuitive because if i add 1:25 am and 12:05 am I would get a time like 2:30pm or something else wierd, but excel doesn't do that. Nevertheless, its doing what I want even though logically I think it shouldn't.

  5. #5
    Registered User
    Join Date
    05-08-2010
    Location
    Virginia, United States
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Just want hours and minutes not am and pm

    Actually I take that back, if I add 24:05 to 1:25, excel converts 24:05 to "24:05:00 PM" and the values will not add together to get 25:30 or 25 hours 30min

  6. #6
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2007
    Posts
    10,056

    Re: Just want hours and minutes not am and pm

    If you sum the times and custom format the result cell with this format

    [h]:mm

    then that will display hours over 24

  7. #7
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2007, 2010
    Posts
    25,770

    Re: Just want hours and minutes not am and pm

    Does for me:
          --A-- ----B-----
      1   24:05           
      2    1:25           
      3   25:30 A3: =A1+A2
    All the cells are formatted as [h]:mm
    Microsoft MVP - Excel
    Entia non sunt multiplicanda sine necessitate

  8. #8
    Registered User
    Join Date
    05-08-2010
    Location
    Virginia, United States
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Just want hours and minutes not am and pm

    I have all cells involved in the summation in h:mm format.

    I enter in cell B2 "1:25" formula bar shows "1:25:00 AM"
    I enter in cell B3 "24:05" formula bar shows "1/1/1900 12:05:00 AM"
    I enter in cell B4 "=SUM(B3:B4)" formula bar shows "=SUM(B3:B4)"

    I highlight all cells and use custom h:mm format. Something very weird is happening when i enter cell B3's values, excel is automatically converting it to a date and time.

  9. #9
    Registered User
    Join Date
    05-08-2010
    Location
    Virginia, United States
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Just want hours and minutes not am and pm

    ok I have to use [h]:mm not h:mm in order to get it to work. What is the difference between using the braces versus not?

  10. #10
    Registered User
    Join Date
    05-08-2010
    Location
    Virginia, United States
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Just want hours and minutes not am and pm

    Thank you guys for your help. Much appreciated.

  11. #11
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2007
    Posts
    10,056

    Re: Just want hours and minutes not am and pm

    Quote Originally Posted by excelinator View Post
    ok I have to use [h]:mm not h:mm in order to get it to work. What is the difference between using the braces versus not?
    If you use h:mm you get "clock time". I.e. that will never display higher than 23:59, but [h]:mm gives you "elapsed time" so it will display any number of hours.

    Note that it doesn't change the actual value, just the display

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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.2.0