+ Reply to Thread
Results 1 to 3 of 3

How to convert "26:38:00" to "26:38" when the cell is formatted as Time?

  1. #1
    Registered User
    Join Date
    10-26-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2016
    Posts
    56

    How to convert "26:38:00" to "26:38" when the cell is formatted as Time?

    Hello! I am in the process of importing data from the web to excel, however it keeps auto formatting numbers into time before presenting me with the data. I've spent hours looking around the web for a solution to that but it just doesn't exist, I can't stop it, so I'm hoping to convert everything in a new cell.

    For example the returned data is:

    26:38:00
    24:42:00

    Anything over 24 comes up like that and it is driving me insane. If I convert the cell to text I will get a number like "1.10972222222222", which is not what I want...

    How can I convert this to a text valued cell with a formula in Column B to the right of the source numbers? I want the numbers to return as "26:38" and be formatted as text. Numbers under 24 read correctly as "20:16" or something, but are still formatted as Time... even when I Copy > Paste Special > Values it stays as time! I have already disabled date recognition in the macro that is importing this data but it has no effect on the time values...

    Please any help would be much appreciated.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How to convert "26:38:00" to "26:38" when the cell is formatted as Time?

    =TEXT(A1,"[h]:mm") should do it
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    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

  3. #3
    Registered User
    Join Date
    10-26-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2016
    Posts
    56

    Re: How to convert "26:38:00" to "26:38" when the cell is formatted as Time?

    Wow that is fantastically simple, thank you!

+ 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] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  2. [SOLVED] Assign Categories for Time of Day: "Morning", "Afternoon", "Evening"
    By long_shanks in forum Excel General
    Replies: 3
    Last Post: 06-11-2013, 02:59 AM
  3. Replies: 8
    Last Post: 12-31-2012, 05:19 PM
  4. convert "15000" to "Fifteen thousand" in excel cell?
    By anurag in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-04-2006, 03:10 AM
  5. [SOLVED] In Excel a cell formatted "currency" shows "######" help!
    By llveda in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-07-2006, 04:40 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