+ Reply to Thread
Results 1 to 4 of 4

Excel time formatting (hours, minutes, seconds)

  1. #1
    Registered User
    Join Date
    12-31-2016
    Location
    usa
    MS-Off Ver
    2016
    Posts
    1

    Excel time formatting (hours, minutes, seconds)

    I am having trouble sorting my column C from largest to smallest in time.

    I need a way to format it quick because my program scrapes in seconds, minutes, and hours.

    S=Seconds
    M=Minutes
    H=Hours

    Here is a screenshot:
    http://prntscr.com/dq6eba


    I can't sort based on numbers because my numbers have different units. I need to be able to do it quickly because I have a lot of data that I'll be working with so if theres a way that I can tell excel that S is seconds, M is minutes and H is hours and then with a click of a button to sort from highest to smallest that'd be great. Can anyone advise please.

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Excel time formatting, please help.

    Hello & Welcome to the Forum,

    Without having data to work with (a picture is not usable data), maybe this is an option, but more explanation may be required.

    This will convert the hours, minutes, and seconds into comparable seconds and then you can sort smallest to largest. I'm not sure what column C is telling me.

    =(SUBSTITUTE(A1,RIGHT(A1,1),"")+0)*(LOOKUP(RIGHT(A1,1),{"h","m","s"},{3600,60,1}))

    Might be a big hammer, but maybe it could work. A lot also depends on if this is a one off...
    HTH
    Regards, Jeff

  3. #3
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Excel time formatting (hours, minutes, seconds)

    Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

  4. #4
    Forum Contributor
    Join Date
    12-18-2016
    Location
    London
    MS-Off Ver
    Microsoft 2013
    Posts
    145

    Re: Excel time formatting (hours, minutes, seconds)

    Select cell and right click.
    From shortcut menu, go to Format cells. Format cells dialog box appears.
    In the dialog box. click custom under Category list. Find hh:mm:ss from right list.
    Now edit it as hhmmss in the right side just under 'Type:'.
    Or
    =TEXT(A1, "hh:mm")

+ 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. [SOLVED] VBA Code Question for Sorting Time Elapsed into Separate Columns Hours / Minutes / Seconds
    By unit285 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-12-2016, 11:15 AM
  2. Replies: 2
    Last Post: 07-19-2012, 12:48 PM
  3. Replies: 1
    Last Post: 11-02-2011, 06:50 PM
  4. Replies: 1
    Last Post: 11-02-2011, 06:44 PM
  5. Replies: 6
    Last Post: 12-22-2010, 07:23 AM
  6. [SOLVED] Elapsed Time in Hours, Minutes and Seconds
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-02-2006, 03:50 PM
  7. 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