+ Reply to Thread
Results 1 to 11 of 11

Fomula: How to convert a TEXT into a usable time which can be formatted

  1. #1
    Registered User
    Join Date
    09-03-2012
    Location
    Australia, Victoria
    MS-Off Ver
    Excel 2003
    Posts
    25

    Fomula: How to convert a TEXT into a usable time which can be formatted

    Hi All,

    Just wondering how I could convert this text eg. 10:00PM into 10:00 PM with a formula which can be formatted

    Thanks

  2. #2
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Fomula: How to convert a TEXT into a usable time which can be formatted

    Try:

    Select the range CTRL+F to activate Find/Replace command & Replace PM with <space>PM

    hit space bar instead of <space> & format the cell as time.
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  3. #3
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Fomula: How to convert a TEXT into a usable time which can be formatted

    Try this...
    =--SUBSTITUTE(SUBSTITUTE(A1,"P"," P"),"a"," A")
    Format that cell as time.

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  4. #4
    Registered User
    Join Date
    09-03-2012
    Location
    Australia, Victoria
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Fomula: How to convert a TEXT into a usable time which can be formatted

    -------------------
    Last edited by arekkusu03; 07-17-2013 at 07:40 PM.

  5. #5
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Fomula: How to convert a TEXT into a usable time which can be formatted

    That implies that the cell does not contain what we think it does.
    Can you attach a workbook with some sample data?

  6. #6
    Registered User
    Join Date
    09-03-2012
    Location
    Australia, Victoria
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Fomula: How to convert a TEXT into a usable time which can be formatted

    Hi Haseeb, I'm looking for a formula which will automatically convert the text into time, as I'll be dumping Raw data from a program that will generate a report

    thank you for your reply

  7. #7
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Fomula: How to convert a TEXT into a usable time which can be formatted

    SUBSTITUTE is a case sensitive formula. Replace Ron's formula to;

    =--SUBSTITUTE(SUBSTITUTE(LOWER(A1),"p"," P"),"a"," A")

  8. #8
    Registered User
    Join Date
    09-03-2012
    Location
    Australia, Victoria
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Fomula: How to convert a TEXT into a usable time which can be formatted

    Hi All,

    Please find attached a sample of what I mean in cell A1
    Example.xlsxExample.xlsx

    Thank you

  9. #9
    Registered User
    Join Date
    09-03-2012
    Location
    Australia, Victoria
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Fomula: How to convert a TEXT into a usable time which can be formatted

    Hi Haseeb, sorry that formula still doesn't allow me to change the format.

  10. #10
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Fomula: How to convert a TEXT into a usable time which can be formatted

    Ooops! Thanks for catching that, Haseeb.

  11. #11
    Registered User
    Join Date
    09-03-2012
    Location
    Australia, Victoria
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Fomula: How to convert a TEXT into a usable time which can be formatted

    Thanks it works, Ron and Haseeb,

    It works now

    =--SUBSTITUTE(SUBSTITUTE(LOWER(A1),"p"," P"),"a"," A")

+ 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. Convert imported text to a usable function in VBA
    By Chick3nD3m0n in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-08-2012, 07:01 PM
  2. Convert Data into Usable database format
    By drbotts in forum Excel General
    Replies: 2
    Last Post: 07-02-2012, 01:31 PM
  3. Convert Text-Formatted Fraction (4 / 4) to Percent %?
    By WilyTrader in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-02-2010, 02:39 PM
  4. [SOLVED] i have fields that are formatted for text that randomly convert t.
    By dave glynn in forum Excel General
    Replies: 2
    Last Post: 02-22-2005, 05:06 PM
  5. In Excel how can you convert a cell formatted for time (4:30) to .
    By Lisa in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-15-2005, 09:06 AM

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