+ Reply to Thread
Results 1 to 17 of 17

Reformat and delete text in a column

  1. #1
    Registered User
    Join Date
    10-10-2024
    Location
    Texas USA
    MS-Off Ver
    Microsoft 365
    Posts
    9

    Reformat and delete text in a column

    This is the text I need to edit

    2024-09-19T10:27:00-05:00


    I need to Delete the "T", Reformat the Date to MM/DD/YYYY, add a space and reformat the Time to HH:MM (24 hr clock) and delete "-5:00.



    Final Result should look like this

    09/19/2024 10:27

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,787

    Re: Reformat and delete text in a column

    How about
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and format the cell to your needs.

  3. #3
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,466

    Re: Reformat and delete text in a column

    I believe the format of your data always has leading zeros for single digit elements as a standard. Given that , here is another formula that will work in any version of Excel...
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by Rick Rothstein; 10-10-2024 at 07:44 PM.

  4. #4
    Registered User
    Join Date
    10-10-2024
    Location
    Texas USA
    MS-Off Ver
    Microsoft 365
    Posts
    9

    Re: Reformat and delete text in a column

    Thanks for the quick response. Those all let to producing errors. I've attached the file so y'all can see more specifically what I have. My apologies, I have not done this stuff in many many years.
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,787

    Re: Reformat and delete text in a column

    They both work for me
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    10-10-2024
    Location
    Texas USA
    MS-Off Ver
    Microsoft 365
    Posts
    9

    Re: Reformat and delete text in a column

    I am so confused. I copied the formula from my clipboard and onto column C and I get the error #N/A. The format of data in Column B is "General". What am I doing wrong?

  7. #7
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,787

    Re: Reformat and delete text in a column

    Did you change the range in the formula to look at B2?

  8. #8
    Registered User
    Join Date
    10-10-2024
    Location
    Texas USA
    MS-Off Ver
    Microsoft 365
    Posts
    9

    Re: Reformat and delete text in a column

    Thank You. No I hadn't done that. Now the result in column C is as follows 45554.43542. How to I change the format for the date and time?

  9. #9
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,787

    Re: Reformat and delete text in a column

    You can apply a cutom format, have a look at the workbook I supplied.

  10. #10
    Registered User
    Join Date
    10-10-2024
    Location
    Texas USA
    MS-Off Ver
    Microsoft 365
    Posts
    9

    Re: Reformat and delete text in a column

    You are a genius Thank you so very much. Wow ! Thank you.

  11. #11
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,787

    Re: Reformat and delete text in a column

    Glad to help & thanks for the feedback.

  12. #12
    Registered User
    Join Date
    10-10-2024
    Location
    Texas USA
    MS-Off Ver
    Microsoft 365
    Posts
    9

    Re: Reformat and delete text in a column

    Is there any way to deleted column B after the reformatted data is in column C?

  13. #13
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,787

    Re: Reformat and delete text in a column

    You would need to copy/paste the formula in col C as values. Then you could delete col B

  14. #14
    Registered User
    Join Date
    10-10-2024
    Location
    Texas USA
    MS-Off Ver
    Microsoft 365
    Posts
    9

    Re: Reformat and delete text in a column

    How to I make it ignore blanks?

  15. #15
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,466

    Re: Reformat and delete text in a column

    .
    Whose ever formula you use, just wrap it in and IFERROR function call...

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by Rick Rothstein; 10-11-2024 at 04:29 PM.

  16. #16
    Registered User
    Join Date
    10-10-2024
    Location
    Texas USA
    MS-Off Ver
    Microsoft 365
    Posts
    9

    Re: Reformat and delete text in a column

    I'm getting so close with the forum's assistance. I thank you for your time. I'm down to the wire on my deadline and need some help with a few last things. This is what I need to finish up on and need your help.

    This is what I need for my end result

    Select macro that will: Supervisor said it must be either a macro or a Script as long as it can be shared by multiple users. We do have a shared drive that can be used for storage.


    Increase columns to be 25 pt wide

    Add columns between B&C, E&F, and G&H (to place the formula in. Is there a formula that can do that?

    In the new column B Reformat the raw data in Time/Date columns - Remove "t" and -5.00, and ignore blank rows using =IFERROR(SUBSTITUTE(TEXTBEFORE(B2,"-",-1),"T"," ")+0,"")

    Format result columns to Custom M/d/yyyy h:mm

    Copy the above to Columns B, D, F and G

    Rename Column F to Event Date, Column H to Damage Site Arrival Time and Column I to Event Date

    Finally delete original columns B,D,F&G (the columns with the raw date Year-Month-Day,"T", Hour and Minute and keep the new data in the adjacent columns

    The final report should be in Calibri 11 pt ( I noticed the above formula didn't keep the original font.

    Thank you.
    Attached Files Attached Files

  17. #17
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,787

    Re: Reformat and delete text in a column

    As this is a completely different question, you would be better off starting a new thread.

+ 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] Reformat dates from text to mm/dd/yy?
    By deleter in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-26-2017, 08:33 AM
  2. Need to reformat mix of text and numbers
    By Sam Williams in forum Excel General
    Replies: 1
    Last Post: 01-26-2013, 10:46 AM
  3. SOLVED - reformat a column
    By abNORMa in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-08-2012, 07:00 PM
  4. Reformat numbers from text to general
    By Kim_J in forum Excel General
    Replies: 3
    Last Post: 04-11-2008, 04:27 PM
  5. Reformat Name Column
    By treva26 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-13-2007, 12:47 AM
  6. Import and reformat text file
    By ltzhao in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-30-2007, 01:13 PM
  7. [SOLVED] REFORMAT A TEXT CELL
    By Jerry Arnone, PMP in forum Excel General
    Replies: 0
    Last Post: 06-08-2005, 07:05 PM

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.6.0 RC 1