• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course โ€“ Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Text to Columns with an Excel Formula

You are here: Home / Excel Formulas / Text to Columns with an Excel Formula
August 26, 2014 by Mynda Treacy

If you reformat data brought into Excel from an external source regularly then youโ€™ve most likely come across Excelโ€™s Text to Columns tool.

You can also reformat text using formulas like MID, SEARCH, LEFT and RIGHT to name a few but this can be tedious and hurt your head ๐Ÿ™‚

If you perform the same head text splitting task regularly then a template can save you loads of time, and thatโ€™s just what weโ€™ve got for you here:

Catalin, our in house Excel Guru has put this template together.

Excel Text to Columns Template

All you have to do is paste your data in column A starting in row 6 and enter your delimiter in cell B3 and youโ€™re done ๐Ÿ™‚ Use it yourself or read Catalinโ€™s explanation of โ€˜how itโ€™s madeโ€™ and learn something new.

Enter your email address below to download the sample workbook.

By submitting your email address you agree that we can email you our Excel newsletter.
Please enter a valid email address.

Download the template here. Note: This is a .xlsm file please ensure your browser doesn't change the file extension on download.

There are 4 templates in this file:

  1. Text to columns - single delimiters
  2. Text to Columns - consecutive delimiters
  3. Text to Columns โ€“ portable version
  4. Text to Columns โ€“ VBA UDF version

Functions used in this template:

MID, LEN & FIND

SUMPRODUCT

SUBSTITUTE

IFERROR

COLUMN โ€“ returns the column number of a reference e.g. =COLUMN() in cell B2 would return a 2 as, column B is the second column.

RIGHT โ€“ returns the specified number of characters from the end of a text string.

LEFT - returns the specified number of characters from the beginning of a text string.

Thanks

I'd like to say a big thanks to Catalin for creating this template. If you want to say thanks to Catalin for sharing this file and his knowledge you can leave him a comment below.

More Excel Formulas Posts

ai-aided excel formula editor

AI Aided Excel Formula Editor

Save time with this free AI Excel formula editor add-in that writes, edits, improves and interprets formulas for you!
top excel functions for data analysts

Top Excel Functions for Data Analysts

Must know Excel Functions for Data Analysts and what functions you donโ€™t have to waste time learning and why.
excel advanced formula environment

Excel Advanced Formula Environment

Excel Advanced Formula Environment is a long awaited, new improved way to write, name and store Excel formulas.
Pro Excel Formula Writing Tips

Pro Excel Formula Writing Tips

Must know Excel formula writing tips, tricks and tools to make you an Excel formula ninja, including a new formula editor.
excel shaping arrays

New Array Shaping Excel Functions

The Excel Shaping Array Functions makes it easier than ever to reshape arrays and ranges using these purpose built functions
excel nested if functions what not to do

Excel IF Formulas and What Not To Do

Excel IF formulas can get out of hand when you nest too many IFs. Not only do they become unwieldy theyโ€™re difficult for anyone to understand
excel image function

Excel IMAGE Function

The Excel IMAGE Function enables you to embed images in a cell using a formula. It supports BMP, JPG/JPEG, GIF, TIFF, PNG, ICO, and WEBP files

Excel VSTACK and HSTACK Functions

New Excel VSTACK and HSTACK functions makes combining arrays of cells easy and with some clever tricks we can extend their capabilities.
identify overlapping dates and times in excel

Identify overlapping dates and times in Excel

How to identify overlapping dates and times in Excel with a formula that checks a range of cells. Works with Dates and Times.
New Excel Text Functions

TEXTSPLIT, TEXTBEFORE and TEXTAFTER Functions

TEXTAFTER, TEXTBEFORE and TEXTSPLIT are exciting new Excel Text functions. Theyโ€™re fairly self-explanatory, however TEXTSPLIT has some cool features.


Category: Excel Formulas
Previous Post:Excel Table Absolute Structured References
Next Post:Deleting Rows in Excel Containing Blanks Returned by Double Quotes

Reader Interactions

Comments

  1. Thomby

    March 8, 2018 at 3:14 am

    Thank you for this! Im an excel newb and my situation requires a space delimiter along with a “/”. For example, Id like to split this : 173sx ss +1a/22507 into 173sx, ss, +1a, 22507. How can i do this with your template? TIA

    Reply
    • Catalin Bombea

      March 8, 2018 at 7:09 am

      Hi Thomby,
      You have more than 1 type of delimiter, there is no ready made formula for this, it needs to be built for this specific purpose.
      Most likely, a vba user defined function will be the best choice. Can you post your question on our forum so we can work on a solution for you? (open a new topic after sign-up)

      Reply
    • jim

      August 25, 2020 at 12:13 am

      you could add a helper column to Catalin’s table which uses SUBSTITUTE to convert all spaces to / and then that is used as the source data for the rest of the table

      Reply
  2. Rishi Kumar

    October 11, 2017 at 7:16 pm

    Don’t make it complicated.

    Just check below one.

    =MID(SUBSTITUTE($D$2136,$E$2135,””),COLUMN()-5,1)

    Reply
    • Catalin Bombea

      October 13, 2017 at 6:32 pm

      Hi Rishi,
      What is the formula for? Can you clarify what you have in those 2 cells $D$2136,$E$2135?

      Reply
  3. Kakrishna

    October 1, 2017 at 9:05 pm

    It was wonderful. I would like to learn more

    Reply
    • Mynda Treacy

      October 1, 2017 at 9:32 pm

      Glad you liked it, Kakrisna ๐Ÿ™‚ I hope you discover more on our site that’s of interest to you.

      Mynda

      Reply
  4. jef

    September 2, 2014 at 10:26 pm

    Great. Worked perfectly. Thanks for sharing.

    Reply
    • Philip Treacy

      September 2, 2014 at 10:43 pm

      thanks Jef ๐Ÿ™‚

      Reply
  5. Imran

    August 30, 2014 at 7:48 pm

    Dear Mynda, Great Job

    Reply
    • Philip Treacy

      August 31, 2014 at 7:58 pm

      On behalf of Catalin, thanks Imran.

      Reply
  6. Subash

    August 27, 2014 at 8:38 pm

    Hi,

    Thank you very much for taking the time to share this experience Catalin.
    Thank you for posting the same on this great informative blog Mynda.

    It is indeed very helpful in most of the scenarios. Although, I have a scene when I have dates sent to me in a format which is not excel compliant (in text format even if I change the same to number or date it doesn’t help) so I have to send text to columns and then use the formula for joining the three columns with “&” to get the format for excel to understand it as a date for calculating number of days.

    I tried putting a date in the place of Sunday/Monday/Tuesday and it returned the text format of the date in column B (08/14/14 or 08-04-14 {I changed the delimiter to -} returned 41855). Is there a way around this please.

    Thank you in advance.

    Warm Regards,
    Subash

    Reply
    • Catalin Bombea

      August 27, 2014 at 11:42 pm

      Hi Subash,
      Thanks for your kind words ๐Ÿ™‚
      If you have 3 columns with year, month, day, you don’t have to join them with & (to concatenate them), just use the Date function:
      =date(year,month,day). In these arguments, set the references to the appropriate columns, like:=DATE(A1, B1, C1), even DATEVALUE will work:
      =DATEVALUE(A1&”/”&B1&”/”&C1)
      If you have dates in first column, that’s another problem: dates are in fact numbers; doesn’t matter how you format the cells to see that date , that cell will always have a number, in decimal system , without any delimiter. In other words, what you see is not what you have in that cell. Dates cannot be “split” with text to column tools, only with simple formulas, like:
      =Year(A1), or Month(A1), and Day(A1).
      Hope it’s clear enough ๐Ÿ™‚
      Catalin

      Reply
  7. Steve Davis

    August 27, 2014 at 1:43 pm

    Thank you very much for taking the time to share this little exercise Catalin.

    Steve.

    Reply
    • Catalin Bombea

      August 27, 2014 at 2:36 pm

      You’re wellcome Steve, it’s more like an exercise on “How to think in Excel” to build formulas, at least, that’s what i consider it, the file containes detailed explanations on the “construction” process.
      Cheers,
      Catalin

      Reply
  8. roberto mensa

    August 27, 2014 at 7:25 am

    another alternative:

    =IF(LEN($A6)-LEN(SUBSTITUTE($A6,$B$3,""))+1<COLUMNS($B12:B12),"",TRIM(MID(SUBSTITUTE($A6,$B$3,REPT(" ",999),COLUMNS($B12:B12)),FIND("ยง",SUBSTITUTE($B$3&$A6,$B$3,"ยง",COLUMNS($B12:B12))),999)))

    also compatible with excel 2003

    Reply
  9. roberto mensa

    August 27, 2014 at 7:02 am

    Hi I’m thinking about something like this:
    in B6

    =TRIM(MID(SUBSTITUTE($A6,$B$3,REPT(" ",999)),(COLUMNS($B7:B7)-1)*999+1,999))

    regards
    r

    Reply
    • Mynda Treacy

      August 27, 2014 at 9:10 am

      ๐Ÿ™‚ Thanks, Roberto. There is no end to your creativity!

      Reply
    • Kris

      August 29, 2014 at 7:49 am

      I prefer this version with simplified column reference – also in B6:
      =TRIM(MID(SUBSTITUTE($A6,$B$3,REPT(” “,999)),(COLUMN(A1)-1)*999+1,999))
      What do you think? ๐Ÿ˜‰

      Cheers,
      Kris

      Reply
      • Mynda Treacy

        August 29, 2014 at 8:13 am

        Hi Kris,

        I like yours much better than Roberto’s ๐Ÿ˜‰

        Mynda

        Reply
      • Catalin Bombea

        August 30, 2014 at 4:48 pm

        It’s a lot simpler and easier to understand, thanks for sharing ๐Ÿ™‚ . Our text to column version is an exercise to help people understand how to “think in excel”, the file has very detailed explanations for each step of the process.I agree that your approach is the best ,i wrote a few years ago a formula using the delimiter substitution technique, to extract only a specified element from the text string. It’s the equivalent formula for VBA’s Split method. For those interested, the formula can be found on our OneDrive folder.
        Cheers,
        Catalin

        Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Current ye@r *

Leave this field empty

Sidebar

More results...

Featured Content

  • 10 Common Excel Mistakes to Avoid
  • Top Excel Functions for Data Analysts
  • Secrets to Building Excel Dashboards in Less Than 15 Minutes
  • Pro Excel Formula Writing Tips
  • Hidden Excel Double-Click Shortcuts
  • Top 10 Intermediate Excel Functions
  • 5 Pro Excel Dashboard Design Tips
  • 5 Excel SUM Function Tricks
  • 239 Excel Keyboard Shortcuts

100 Excel Tips and Tricks eBook

Download Free Tips & Tricks

Subscribe to Our Newsletter

Receive weekly tutorials on Excel, Power Query, Power Pivot, Power BI and More.

We respect your email privacy

Guides and Resources

  • Excel Keyboard Shortcuts
  • Excel Functions
  • Excel Formulas
  • Excel Custom Number Formatting
  • ALT Codes
  • Pivot Tables
  • VLOOKUP
  • VBA
  • Excel Userforms
  • Free Downloads

239 Excel Keyboard Shortcuts

Download Free PDF

Free Webinars

Excel Dashboards Webinar

Watch our free webinars and learn to create Interactive Dashboard Reports in Excel or Power BI

Click Here to Watch Now

mynda treacy microsoft mvpHi, I'm Mynda Treacy and I run MOTH with my husband, Phil. Through our blog, webinars, YouTube channel and courses we hope we can help you learn Excel, Power Pivot and DAX, Power Query, Power BI, and Excel Dashboards.

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk – For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.