Function Problems

How to Add a TXT Extension to an Excel Column Automatically

Aamir Naveed AkramAamir Naveed Akram Nov 10, 2026 870 views

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.

How to Add a TXT Extension to an Excel Column Automatically
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.
Before you start

Ensure your list of file names is placed in a single continuous column without blank rows to make applying the formula smoother.

Solution 1Recommended

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.

1
Select the target cell

Click on the top cell of the adjacent empty column where you want the new names to appear (for example, D2).

2
Enter the array formula

Type =C2:C2935&".txt" (assuming your file names are in column C from row 2 to 2935).

3
Press Enter

Hit Enter. The results will automatically spill down the column, instantly adding the .txt extension to all specified file names.

Use the Spill Formula for Dynamic Arrays
Efficiency Tip: This method prevents manual errors and automatically updates if the source data range expands.

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. 1. Open your dataset in WPS Spreadsheet: Launch WPS Office and open your workbook containing the file names.
  2. 2. Input the concatenation formula: In the adjacent column, type =A2&".txt" (adjusting A2 to match your data).
  3. 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.
Fully compatible with Microsoft Excel formulas and functions.Easily apply bulk text edits to massive datasets with zero lag.Lightweight, free to use, and features a familiar tabbed interface.
microsoft office alternative - wps office

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.