Skip to main content
 

How to extract extension from filename in Excel?

Author: Kelly Last Modified: 2024-08-12
sample data

Let’s say you have a list of filenames in a worksheet as left screenshot shown, and now you need to extract the extensions from each filename. How to solve it easily in Excel? In this article, I will introduce three methods to archive it.

Extract extensions from filenames with formulas

Extract extensions from filenames with Extract Text utility of Kutools for Excel

Extract extensions from filenames with Split Cells utility of Kutools for Excel


arrow blue right bubble Extract extensions from filenames with formulas

If you are familiar with Excel functions, you can combine the Right function, Find function, Substitute function and Len function to extract extensions from filenames. Please do as follows:

Select a blank cell next to the file names, and enter the formula =RIGHT(A2,LEN(A2)-FIND("|",SUBSTITUTE(A2,".","|",LEN(A2)-LEN(SUBSTITUTE(A2,".",""))))) into it, and then drag the Fill Handle to the range as you need. See below screenshots:

Extract extensions from filenames with formula

drag and fill formula to other cells

Note: In above formula, A2 is the filename cell that you will extract extension from. And you can change it based on your needs.



arrow blue right bubble Extract extensions from filenames with Extract Text utility of Kutools for Excel

If you have Kutools for Excel installed, its Extract Text utility can help you extract extensions from filenames easily. Please do as follows:

Kutools for Excel - Packed with over 300 essential tools for Excel. Enjoy permanently free AI features! Download now!

1. Select the filename cells that you will extract extensions from, and click the Kutools > Text > Extract Text.

click Extract Text of kutools

2. In the opening Extract Text dialog box, type .*  into the Text box, click the Add button, and then click the Ok button.

Note: If there already has extract rules in the Extract list, please clear all the old rules except the new added one.

set options in the Extract Text  dialog box

3. In the new opening dialog box, specify the first cell address of destination range, and click the OK button.

select a cell to put the result

Now you will see all extensions of filenames are extracted and output into the specified range. See below screenshot:

all extensions of filenames are extracted and output into the specified range

Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy permanently free AI features! Get It Now


arrow blue right bubble Extract extensions from filenames with Split Cells utility of Kutools for Excel

Apart from Extract Text utility, you can also apply Kutools for Excel’s Split Cells utility to extract extensions from filenames. Please do as follows:

Kutools for Excel - Packed with over 300 essential tools for Excel. Enjoy permanently free AI features! Download now!

1. Select the filename cells that you will extract extensions from, and click the Kutools > Text > Split Cells.

click Split Cells of kutools

2. In the popping out Split Cells dialog box, check Split to Columns option, check Other option, type . into the below box, and click the Ok button.

set options in the Split Cells dialog box

3. In the second Split Cells dialog box, specify the first cell address of destination range, and click the OK button.

select a cell to put the result

Now you will see the filenames column is split into two columns: filename column and extension column as below screenshot shown.

the filenames column is split into two columns: filename column and extension column

If necessary, please delete the new filename column based on your needs.

Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy permanently free AI features! Get It Now


arrow blue right bubbleRelated articles:

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!