How to Add a TXT Extension to an Excel Column Automatically
Question details
The user wants to append a '.txt' extension to a large list of file names in an Excel column without manually editing or dragging each cell.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Formatting a large dataset of file names by appending a specific file extension.
- Observed behavior
- Thousands of file names lack the required '.txt' extension, requiring a bulk automated solution rather than manual row-by-row editing.
Ensure your list of file names is placed in a single continuous column without blank rows to make applying the formula smoother.
Use the Spill Formula for Dynamic Arrays
Ideal for modern spreadsheet versions, this method applies the extension to the entire column instantly using a single formula.
If you are using Excel 365 or a modern spreadsheet tool that supports dynamic arrays, you don't need to drag the formula down manually. A single formula will automatically calculate and spill the results into the adjacent cells.
Click on the top cell of the adjacent empty column where you want the new names to appear (for example, D2).
Type =C2:C2935&".txt" (assuming your file names are in column C from row 2 to 2935).
Hit Enter. The results will automatically spill down the column, instantly adding the .txt extension to all specified file names.

Use the Standard Concatenation Formula
Use this method if you are running an older version of Excel that does not support dynamic array spill functions.
Batch Add File Extensions with WPS Spreadsheet
WPS Spreadsheet fully supports advanced array formulas and concatenation, making it incredibly easy to append text or file extensions to thousands of rows in seconds.
- 1. Open your dataset in WPS Spreadsheet: Launch WPS Office and open your workbook containing the file names.
- 2. Input the concatenation formula: In the adjacent column, type =A2&".txt" (adjusting A2 to match your data).
- 3. Apply to the whole column: Press Enter, then double-click the fill handle in the bottom-right corner of the cell to populate all rows instantly.

Frequently Asked Questions
Can I add a different extension like .csv or .pdf instead?
Yes, simply replace the ".txt" part of the formula with your desired extension. For example, typing =C2&".pdf" will add a PDF extension to your file names.
How do I remove the formulas and keep only the new text?
Select the column with your new file names, copy them (Ctrl+C), then right-click the same column and choose 'Paste as Values'. This removes the underlying formulas and leaves only the final text.
Why is my array formula showing a #SPILL! error?
A #SPILL! error occurs if there is existing data blocking the formula from expanding down the column. Clear any text or data in the cells below your formula to allow it to spill properly.




