Function Problems

How to Extract and Convert Sequential File Names to Words in Excel

Anum MushtaqAnum Mushtaq Oct 14, 2026 869 views

Question details

The user needs to extract specific text components from structured file names and convert the ending numerical sequence into spelled-out English words.

Product
Excel
Device & OS
not provided
Scenario
Organizing and converting structured file names (e.g., ectopic.rhythm.date.sequence) into readable text labels or patient names.
Observed behavior
File names contain multiple periods separating data points, requiring formulas to isolate the parts and translate the numerical sequence at the end into text.
Before you start

Review your dataset to ensure the file names follow a consistent structure, as text extraction formulas rely on consistent delimiters like periods.

Solution 1Recommended

Extract Components and Convert Numbers Using Formulas

Use modern text extraction formulas combined with the CHOOSE function to isolate the text and convert the sequence number into a word.

This approach uses functions to isolate specific parts of the file name based on the position of the periods. It is highly effective for standardized naming conventions.

1
Extract the prefix text

Assuming the file name is in cell A2 (e.g., ectopic.rhythm.1023.1), use the formula =SUBSTITUTE(TEXTBEFORE(A2,".",2),".","") to pull the first two sections and remove the period between them.

2
Extract the sequence number

Use the formula =--TEXTAFTER(A2,".",-1) to isolate the final number at the end of the string. The double negative (--) ensures the extracted text is recognized as a numerical value.

3
Convert the number to a word

Wrap the extraction in a CHOOSE function for numbers 1-10 by entering =CHOOSE(--TEXTAFTER(A2,".",-1),"One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten").

4
Concatenate the results

Combine the formulas using the & operator to join the extracted name text and the spelled-out number into a single finalized cell.

Extract Components and Convert Numbers Using Formulas
Formula Reliability: Keeping the file-name pattern consistent, with the sequence number strictly as the final period-separated element, ensures these formulas work reliably across thousands of rows.
Advanced Data Management

Easily Extract Text and Manage Data with WPS Spreadsheet

WPS Office provides a rich set of built-in functions to split text, substitute characters, and extract specific file name sections seamlessly. Handle complex text and data conversions efficiently within a highly intuitive interface.

  1. 1. Open your data file: Launch WPS Spreadsheet and open the document containing your list of sequential file names.
  2. 2. Use Text-to-Columns: Select the column with your file names, navigate to the Data tab, and click Text-to-Columns.
  3. 3. Set the delimiter: Choose the 'Delimited' option and select 'Other', typing a period (.) to split the file names into distinct columns.
  4. 4. Apply mapping formulas: Use standard formulas like CHOOSE on the newly separated sequence column to convert your final numbers into words.
Fully compatible with Microsoft Excel formulas, functions, and file formats (.xlsx).Advanced text manipulation tools, including intuitive Text-to-Columns features.Lightweight and free alternative for managing complex datasets without performance lag.
microsoft office alternative - wps office

Frequently Asked Questions

Can I convert numbers larger than 10 to words using a formula?

The CHOOSE function is best for small, predictable numbers like 1-10. For larger numbers, you typically need to use a custom VBA macro or an advanced LAMBDA function to spell out the digits dynamically.

What if my file names have an inconsistent number of periods?

If the structure varies but the sequence number is always at the very end, using the TEXTAFTER formula with a -1 instance argument is highly effective. It forces the function to search from the end of the string backward, ignoring the inconsistent periods at the beginning.

Why is the sequence conversion formula returning a #VALUE! error?

This usually happens if the extracted sequence is recognized as text rather than a number. Ensure you use the double negative (--) or the VALUE function to convert the extracted text string into a numeric value before nesting it inside the CHOOSE function.