How to Extract and Convert Sequential File Names to Words in Excel
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.
Review your dataset to ensure the file names follow a consistent structure, as text extraction formulas rely on consistent delimiters like periods.
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.
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.
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.
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").
Combine the formulas using the & operator to join the extracted name text and the spelled-out number into a single finalized cell.

Standardize File Naming Conventions
Rearrange the file-naming pattern to place the sequence in a fixed, easily accessible position to simplify extraction.
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. Open your data file: Launch WPS Spreadsheet and open the document containing your list of sequential file names.
- 2. Use Text-to-Columns: Select the column with your file names, navigate to the Data tab, and click Text-to-Columns.
- 3. Set the delimiter: Choose the 'Delimited' option and select 'Other', typing a period (.) to split the file names into distinct columns.
- 4. Apply mapping formulas: Use standard formulas like CHOOSE on the newly separated sequence column to convert your final numbers into words.

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.




