Skip to main content

How to separate text and numbers from one cell into two columns?

Author: Xiaoyang Last Modified: 2024-11-13

If you have a column of text strings which are composed of text and numbers, now, you would like to separate the text and numbers from one cell into two different cells as following screenshot shown. In Excel, you can finish this task with these methods.


Method 1: Separate text and numbers with formulas in Excel

With the following formulas, you can extract the text and numbers from the cell into two separated cells. Please do as follows:

1. Enter this formula into a blank cell – C3 where you want to place the result: =LEFT(A3,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A3&"0123456789"))-1), (A3 is the cell which contains the text string you want to separate), and then press Enter key to get only the text from the cell A2. See screenshot:

apply a formula to extract text

2. And then you can extract the numbers from the cell by applying this formula: =RIGHT(A3,LEN(A3)-MIN(FIND({0,1,2,3,4,5,6,7,8,9},A3&"0123456789"))+1),( A3 is the cell which contains the text string you want to separate), enter this formula into cell D3 which you want to place the numbers, and press Enter key, then you will get the numbers as this:

apply a formula to extract numbers

3. Then select cell C3:D3, and drag the fill handle over to the cells that you want to contain these formulas, and you can see the text and numbers have been separated into different cells:

drag the formulas down to other cells


Split or Separate text strings into individual text and number columns:

Kutools for Excel's Split Cells feature is a powerful tool, it can help you to split cell values into multiple columns or rows, it also can help you to slit alphanumeric strings into separated text and numbers columns, etc… Click to download Kutools for Excel!

split text and number by kutools

Method 2: Separate text and numbers with Flash Fill in Excel 2013 and later version

With the above formulas, you just can separate the text and numbers if the text is before the numbers. To separate the text string which number is before the text, you can use the Flash Fill feature of Excel 2013 and later version.

If you have Excel 2013 and later version, the Flash Fill feature may help you to fill the text in one column and numbers in another column, please do as this:

1. Type the numbers of your first text string completely into adjacent blank cell - B3, see screenshot:

Type the numbers of the first text string completely

2. And then select the range B3:B7 where you want to fill the numbers, and click Data > Flash Fill, and only the numbers have been filled in the cells at once, see screenshot:

click Data > Flash Fill

3. Then enter the text string completely into cell C3, see screenshot:

enter the text string completely

4. And select the cell range C3:C7 where you want to fill the text only, click Data > Flash Fill as well as step 2, and you can see, the text has been separated as follows:

click Data > Flash Fill

Tip: You also can drag the filled handle to the range you want to use, and then click Auto Fill Option and check Flash Fill.

click Auto Fill Option and check Flash Fill

Method 3: Separate text and numbers which are mixed irregular with User Defined Function

If you have some text string which are mixed text and numbers irregularly like following data shown, Excel does not support the general feature to solve this problem, but, you can create User Defined Function to finish this.

Separate text and numbers which are mixed irregular

1. Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste the following code in the Module Window.

VBA code: separate text and numbers into different cells from one cell

Public Function SplitText(pWorkRng As Range, pIsNumber As Boolean) As String
'Updateby Extendoffice
Dim xLen As Long
Dim xStr As String
xLen = VBA.Len(pWorkRng.Value)
For i = 1 To xLen
    xStr = VBA.Mid(pWorkRng.Value, i, 1)
    If ((VBA.IsNumeric(xStr) And pIsNumber) Or (Not (VBA.IsNumeric(xStr)) And Not (pIsNumber))) Then
        SplitText = SplitText + xStr
    End If
Next
End Function

3. Then save and close this code, go back to the worksheet, enter this formula =SplitText(A3,FALSE) into a blank cell to get the only the text string and then drag the fill handle down to the cells that you want to fill this formula, see screenshot:

split text by user defined function

4. And thne, type formula =SplitText(A3,TRUE) into another cell and drag the fill handle down to the cells that you want to fill this formula to get the numbers, see screenshot:

splitnumbers by user defined function

Note: The result will be incorrect if there are decimal numbers in the text string.


Method 4: Separate text and numbers into two columns with Kutools for Excel

If you have Kutools for Excel, with its powerful tool- Split Cells utility, you can quickly split the text strings into two columns: one is number, and another is text.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Itegarate with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

After installing Kutools for Excel, please do as follows:

1. Select the data range that you want to separate the text and number.

2. Then click Kutools > Merge & Split > Split Cells, see screenshot:

click Kutools > Merge & Split > Split Cells

3. In the Split Cells dialog box, select Split to Columns option under the Type section, and then check Text and number from the Split by section, see screenshot:

set options in the dialog box

4. Then click Ok button, and a prompt box will pop out to remind you to select a cell to output the result, see screenshot:

select a cell to output the result

5. Click OK button, and the text strings in the selection have been separated into two columns as following screenshot shown:

the text and numbers are split

Click Download Kutools for Excel and free trial Now!


Separate text and numbers with Kutools for Excel

 

Related articles:

How to split word into separate letters in Excel?

How to split cells into multiple columns or rows by carriage return?


Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!