Function Problems

How to Extract Numbers from Text in Excel 2016

Nimra MalikNimra Malik Nov 4, 2026 869 views

Question details

The user needs a way to separate and extract numeric values from alphanumeric text strings within an Excel 2016 worksheet.

How to Extract Numbers from Text Strings in Excel 2016
Product
Microsoft Excel 2016
Device & OS
not provided
Scenario
Cleaning or processing mixed data where numeric information needs to be separated from surrounding text for calculation or reporting.
Observed behavior
Excel 2016 lacks a single native built-in function to extract numbers from any arbitrary text pattern, requiring workarounds like Flash Fill, formulas, or VBA.
Before you start

Ensure your data does not contain trailing spaces that might interfere with extraction, and determine if you need to extract whole numbers, decimals, or negative values before choosing a method.

Solution 1Recommended

Use Flash Fill for Consistent Data Patterns

Flash Fill is the quickest and easiest method when the numbers you want to extract follow a clear, predictable pattern across the column.

This built-in feature uses machine learning to identify the pattern you demonstrate and applies it to the rest of the data. It works best when all cells share the same text structure.

1
Enter an example

In an empty column immediately next to your data, type the exact number you want to extract from the first cell and press Enter.

2
Activate Flash Fill

Select the cell directly below your typed number, navigate to the Data tab on the ribbon, and click 'Flash Fill' (or press the keyboard shortcut Ctrl + E).

3
Verify results

Check the automatically filled column to ensure Excel correctly identified the pattern. If it missed some variations, manually correct one of the errors to teach the tool.

Use Flash Fill for Consistent Data Patterns
Tip: Providing two or three examples manually before pressing Ctrl + E can significantly improve Flash Fill's accuracy on complex data.

Extract Data Easily with WPS Office

WPS Office offers intuitive data processing tools, including a powerful Flash Fill equivalent and advanced formula capabilities to cleanly separate numbers from text. It is fully compatible with Microsoft Excel files, allowing you to clean your data efficiently.

  1. 1. Open your file in WPS Spreadsheet: Launch WPS Office and open the workbook containing your mixed text data.
  2. 2. Provide a sample extraction: Type the desired extracted number in the adjacent cell to show the software what you need.
  3. 3. Use Flash Fill: Press Ctrl+E or go to the Data tab and select Flash Fill to automatically populate the rest of the column with extracted numbers.
Seamless compatibility with Microsoft Excel (.xlsx) formats.Smart Flash Fill feature to automatically extract numbers based on user patterns.Full support for VBA macros and complex nested formulas.Free, lightweight, and user-friendly interface.
microsoft office alternative - wps office

Frequently Asked Questions

Can I extract numbers with decimals or negative signs using standard formulas?

Standard formulas can be quite complex when handling decimals and negative signs, often requiring nested functions like MID, MIN, FIND, and LEN. For consistent accuracy with non-integer numbers, using VBA or Power Query is usually recommended.

Why did Flash Fill extract the wrong numbers?

Flash Fill relies on recognizing patterns from your sample data. If your text strings have highly inconsistent formats (e.g., varying numbers of spaces or mixed text structures), Flash Fill might misinterpret the pattern. Providing two or three manual examples before activating Flash Fill can improve its accuracy.

Are there any third-party add-ins for extracting text?

Yes, there are custom Excel add-ins available online that provide dedicated custom functions (like NumsLeft or NumsRight) to separate numbers. However, always ensure you download add-ins and their documentation from trusted sources to avoid security risks and malware.