How to Undo Text to Columns in Excel: 3 Simple Methods

Method 1 – Using Ampersand Operator

Steps:

  • Double-click on cell D5 and type in the following formula:
=(B5&” “%C5)

how to undo text to columns in excel

  • Press Enter to undo the text in cell D5.

how to undo text to columns in excel

  • Copy the formula to the cells below to get the same result in these cells as well.


Method 2 – Utilizing CONCATENATE Function to Undo Text to Columns in Excel

Steps:

  • Click cell D5 and enter the below formula:
=CONCATENATE(B5,” “,C5)

Utilizing CONCATENATE Function to Undo Text to Columns in Excel

  • Press the Enter key, and Excel will rejoin the data in columns A and B in cell D5.

Utilizing CONCATENATE Function to Undo Text to Columns in Excel

  • Drag the Fill Handle down to copy the formula to the cells below.
  • The First and Last Names will be put back into column D.


Method 3 – Undo Text to Columns by Applying VBA Code in Excel

Steps:

  • Go to the Developer tab and select Visual Basic.

Undo Text to Columns by Applying VBA Code in Excel

  • In the Visual Basic window, click on Insert and select Module.

Undo Text to Columns by Applying VBA Code in Excel

  • In the new Module1 window, enter the following code:
Public Function UndoTextToColumns(Ran As Range, Optional D As String = " ") As String
    Dim undoTxt
    undoTxt = Application.WorksheetFunction.Transpose(Application.WorksheetFunction.Transpose(Ran.Value))
    UndoTextToColumns = Join(undoTxt, D)
End Function

Undo Text to Columns by Applying VBA Code in Excel

  • Close the VBA window and enter the following formula in cell D5:
=UndoTextToColumns(B5:C5,” “)

  • Press the Enter key and copy the formula to the rest of the cells below.


How to Stop Text to Columns Splitting While Pasting in Excel

Steps:

  • Enter any data in cell B10. We entered ‘a‘ as an example.
  • Go to the Data tab and to Data Tools.
  • Under this section, select Text to Columns.

How to Stop Text to Columns Splitting While Pasting in Excel

  • In the new window, select Delimited and click Next.

How to Stop Text to Columns Splitting While Pasting in Excel

  • Under the Delimiters section, uncheck all the options and click Finish.

How to Stop Text to Columns Splitting While Pasting in Excel

  • Open your dataset and copy them. We copied from Notepad for this example.

  • Paste the data into Excel; it won’t automatically split the text into columns.


Things to Remember

  • You can use the keyboard shortcut Alt+A+E to bring Text to Columns.
  • Remember that the result from the Text to Columns feature is static.
  • The above methods might not work correctly if you are working with URLs.

Download Practice Workbook

You can download the practice workbook from here.


Related Articles


<< Go Back to Splitting TextSplit in ExcelLearn Excel

Get FREE Advanced Excel Exercises with Solutions!
Nazmul Hossain Shovon
Nazmul Hossain Shovon

Nazmul Hossain Shovon, a BUET graduate in Naval Architecture and Marine Engineering, embarked on his career with 8 months dedicated to the Exceldemy project's triumph. Transitioning into a Software Developer role, he specialized in web add-in development. At Exceldemy, he authored about 125 blog articles and solved many visitors’ problems, refining his writing skills and delving into Excel-related topics. With a primary passion for programming and software development, Shovon continually explores new horizons, fostering professional growth in his... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo