Dynamic Text to Columns (πtoπ )
In today's article, we are going to see different ways to do text to columns which are more dynamic and easier than the default "Text to Column" option in Data Tab.
1οΈβ£Regular Text to Column Option (Data Tab)
Before moving to new dynamic options available for Text to Columns, let us look at how the regular Text to Column (traditional) options work.
For Instance, below are the list of sales details given in a combined format which we have to convert into a data table for better analysis.
Steps:
Select the data (which we have to convert into columns)
Navigate to the Data tab Β» Text to Columns (under the Data Tools group)
Delimited Β» insert β comma (,) β in others box as delimiter Β» Next & Finish
Final Result π
Drawbacks ππ»
Static in nature, if we add more data or modify the existing data this option will not dynamically update the same according to the current criteria.
Lengthy Process, this option involves a multi-level process for specifying the delimiter.
2οΈβ£ Power Query
Steps:
Select the whole data Β» and convert it into the table (Ctrl + T)
Navigate to the Data tab Β» From Table/Range (under Get & Transform Data group)
In the Power Query editor Β» Split Columns by (under Home tab & Transform group) Β» By Delimiter
Select Comma as Delimiter and press OK
Change the Column Headings
Navigate to Close and Load to Β» Select the destination location for loading the table
Final Result π
Advantages ππ»
Works Dynamically when adding or modifying the data in the original table. After adding or modifying the existing data, hit the refresh option (or) Alt + F5 in the Splitted data table it will fetch you the updated data containing the modified data.
Initial Lengthy Process and subsequent easy access to the functionality, this option may consume some time in setting up the initial query but can be easily accessed thereafter by just hitting the refresh option.
3οΈβ£ TEXTSPLIT Function (Ζ)
This function is available only for Microsoft 365 users and Excel Web.
Steps:
First syntax: Select the cell in which original data is present
Second syntax: Specify the delimiter in this case comma (,)
Drag the formula to all the cells
Final Result π
Advantages ππ»
Easy to use, since the above option involves only the function itβs easier to use compared to other options mentioned above.
Not Dynamic, but can be dragged for the addition of data to the original table.