How to insert space between number and text in cells in Excel?
In daily data processing tasks with Excel, it's common to encounter cells where numbers and letters are mixed together without any separator, such as "A5B6C8" or "PO1234". This format can make it more difficult to read, analyze, or import such data into other systems that expect a clear division between numbers and text. Adding a space between the numbers and text can greatly enhance clarity, facilitate data cleansing, and improve the results of further processing like sorting and filtering. Below, you will find two practical methods to insert a space at the correct position between numbers and text within Excel cells, each adapted to suit different scenarios and user preferences.
- Insert space between number and text with formula
- Insert space between number and text with Kutools for Excel
- Alternative methods using Text to Columns or Flash Fill
Insert space between number and text with formula
One way to automate the separation of numbers from text in Excel is to use a formula, which is flexible and does not require additional add-ins. This method is especially suitable when you want a quick solution without installing anything extra and when each cell contains the pattern "text followed directly by numbers." However, formulas may have some limitations if your strings contain several transitions between numbers and text, complex formats, or inconsistencies between cells. Always double-check your data and adjust the formula if necessary.

Office Tab
Tabbed navigation for Word, Excel, PowerPoint, and more—just like a web browser, with smooth switching in one window.
1. Select a blank cell where you want the formatted result to appear. Enter the following formula:
=TRIM(REPLACE(A2,MIN(FIND({1,2,3,4,5,6,7,8,9,0},A2&"1234567890")),0," ")) Here, A2 refers to the original cell containing the mixed text and numbers. This formula searches for the first occurrence of a number within the cell and inserts a space before it. The TRIM function is used to remove any unexpected additional spaces, ensuring you only get a single space where intended. See screenshot:
Troubleshooting tip: If you receive a #VALUE! error, check that your cell reference is correct and that the cell contains at least one digit. This formula is designed for cells where numbers immediately follow text; cells starting with numbers may not be affected as intended.
2. After entering the formula, press Enter to get the result for the first cell. To extend this formula to additional cells, drag the fill handle (a small square at the bottom right of the cell) downward or across to copy the formula for other cells as needed. See screenshot:
Note: This formula adds a space only before the first number it finds. For example, converting A5B6C8D6E0F9 results in A 5B6C8D6E0F9. If your data requires inserting spaces at every transition from text to number, consider using a different method, such as a VBA solution. Also, formula-based solutions do not automatically update if the original data pattern changes significantly, so manual review is recommended.
Tip: If you want to replace the formula results with actual values, copy the formula results, then use Paste Special > Values to overwrite the formulas with their outputs.
Insert space between number and text with Kutools for Excel
If you need a more flexible and user-friendly approach, especially for handling large batches of data or data where numbers can appear in various positions, Kutools for Excel can simplify the task significantly. With the Add Text utility, you can easily insert a space before every number in the selected range, ensuring that all numbers are uniformly separated from the accompanying letters no matter the sequence or length of the string. This is particularly useful for users dealing with diverse data formats, such as product codes, invoice numbers, or mixed identifiers.
Kutools for Excel - Supercharge Excel with over 300 essential tools, making your work faster and easier, and take advantage of AI features for smarter data processing and productivity. Get It Now
1. Select the cells where you want to add a space before each number. Then on the Ribbon, go to Kutools > Text > Add Text. See screenshot:
2. In the Add Text dialog box, complete the following settings (see screenshot above for reference):
(1) Enter a single space character in the Text box;
(2) Choose the Only add to option and then select 1st character is number from the drop-down list below. This ensures the space will be added only before leading numbers in any text segment.
3. Click the OK button to apply the changes. All selected cells will now display a space inserted before each qualifying number, as shown below:
This tool is effective for both small and large data sets. Because it's menu-driven, it's less error-prone than formulas and doesn't require any special Excel knowledge. However, Kutools is an add-in, so you will need it installed and activated before using this method. Always preview your changes (using the option in the dialog, if available) when working with important data, and consider making a backup for safety.
Kutools for Excel - Supercharge Excel with over 300 essential tools, making your work faster and easier, and take advantage of AI features for smarter data processing and productivity. Get It Now
Demo: insert space between number and text
Alternative methods using Text to Columns or Flash Fill
Besides formulas and add-ins, Excel provides other built-in tools that may be helpful in certain scenarios. These methods are suitable if you want to separate numbers and text into different columns, or if your data format is quite consistent. They do not always allow you to insert a space within a single cell, but can be useful for cleansing or extracting data for further processing.
Using Text to Columns: For cells where numbers and text are consistently separated by a specific character (e.g., a hyphen or space), you can use Data > Text to Columns. However, if the separation is not marked by a specific character, this method is less effective.
Using Flash Fill: If you're using Excel 2013 or later, you can take advantage of Flash Fill to automate pattern recognition:
- In a cell next to your data, manually type the desired result (for example, add a space between text and number).
- Start typing the expected results for the next cells, and Excel may offer suggestions. Accept suggestions with Enter or finish the pattern and use Data > Flash Fill.
These tools are best when your data follows a predictable pattern. They are fast and do not require formulas or add-ins but may not always deliver perfect results if your data contains irregularities.
Tip: Always review the outcome and test on a subset of your data first to avoid unintentional changes.
In summary, whether you choose to use formulas, Kutools for Excel, or built-in Excel features like Flash Fill and Text to Columns, the best method depends on your data complexity, the volume of cells to process, and your preferred workflow. For most flexible and batch-oriented operations, Kutools for Excel provides an efficient approach. For one-time or formula-driven transformations, an Excel formula or built-in tools are also practical. Always back up your data before performing batch edits or conversions, and review results to catch any inconsistencies early. If you encounter errors or unexpected results, double-check cell formats and ensure that your approach aligns with the structure of your data.
Best Office Productivity Tools
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!
All Kutools add-ins. One installer
Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.
- All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
- One installer, one license — set up in minutes (MSI-ready)
- Works better together — streamlined productivity across Office apps
- 30-day full-featured trial — no registration, no credit card
- Best value — save vs buying individual add-in