Skip to main content

Excel Formula: Remove extension from file name

Here is a list of file names including the extensions, how can you remove the extensions from the file names as below screenshot shown. In this tutorial, it provides a formula to deal with this job, and explains the arguments of the formula and how the formula works in Excel.
doc find position of nth occurrence of a character 1

Generic formula:

=LEFT(filename,FIND(".",filename)-1)

Arguments

Filename: the text string you want to remove the extension from.

Return value

The formula returns the cell contents without extension.

How this formula work

Example: To remove the extension from file names in column B3:B5, please use below formula in C3:C5.

=LEFT(B3,FIND(".",B3)-1)

Press Enter keys to get the result in C3, then drag fill handle down to C5.
doc remove extension 2

Explanation

FIND(".",B3): the FIND function returns the position of a specific character. Here this formula gets the position of character “.”.

=LEFT(B3,FIND(".",B3)-1): the LEFT function extracts text from left side of a text string. Here this formula calculation steps will be shown as below:
=LEFT(B3,FIND(".",B3)-1)
=LEFT(B3,6-1)
=LEFT(B3,5)

Which returns five characters in left side of the text string in cell B3.

Remark

If there are two or more file names with extensions in a cell, this formula only returns the first file name. See screenshot:
doc remove extension 3

Sample File

doc sampleClick to download sample file


Relative Formulas

  • Find most requenst text with criteria
    In some cases, you may want to find the text which appears most frequently based on a criterion in Excel. This tutorial introduces an array formula to handle this job and gives the explanation about the arguments of this formula.
  • Combine cells with commas
    Here this tutorial provides some formulas to join multiple cells into one cell with comma as separator as below screenshot shown, and also explains how the formulas work in Excel.
  • Make text same length
    If there is a list of texts with different lengths, for looking nicer, you can make these text with same length by adding trailing characters as below screenshot shown. Here it provides a formula which combines the LEN and REPT functions to handle it in Excel.
  • Check if cell contains number
    Sometimes, you may want to check if a cell contains numeric characters. This tutorial provides a formula which will return TRUE if the cell contains number, FALSE if cell does not contain number.

The Best Office Productivity Tools


Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations