WPS Office

Free All-in-One Office Suite with PDF Editor

correct-icon

Edit Word, Excel, and PPT for FREE.

correct-icon

Read, edit, and convert PDFs with the powerful PDF toolkit.

correct-icon

Microsoft-like interface, easy to use.

Free download

Windows • MacOS • Linux • iOS • Android

banner

Excel Formula: How to Get the Excel File Name from Path

February 13, 2023
13.1K Views

The excel file name is the file name that you give to it when you save it. It can be very important because the folder where you save your file will store a number of details about it. For example, if you want to save this file again next week and not the week after, or next month and not next week, or just whenever and not at all then knowing how to get thefile name is essential.

If you need to know how to get the file name, there are actually many different techniques that you can use. However, most of them will likely give you an error saying that not enough information was given. This is because there's more than one way to get the file name. In this tutorial we will tell you how to get the file name in excel using different methods

Tips that are provided in this article are compatible with versions 2010/2013/2016.

How to get the excel file name: Cell function Function

The syntax of this function is =CELL(filename)

This allows to have the filename the file by just writing it

1.Open the workbook

2.Select any cell

3.And in formula bar

4.Write the above formula.

The result you see is the location being highlighted in the sheet

How to get the excel file name: Using the Mid function

The Mid function in Excel is used to calculate the midpoint of a range of cells. The Mid function has three arguments, which are the left and right values, respectively.

The Mid function returns the cell with the value halfway between the two given values. It is often used in place of other functions, such as Sum and Average, which require multiple arguments. It can also gives us the respected file name

The next way  to get the excel file name is by using the Mid function The syntax of this function is

=MID(CELL(filename),FIND([,CELL(filename))+1, FIND(],CELL(filename))

-(FIND([,CELL(filename))+1))

1.Once you use this formula, it will display the location of your file right inside the cell you want to display

2.Let us type in excel and see the results now

3.It has displayed our workbook name in the cell , but this time without the location

As you can see know , it has displayed the respected file name for us

How to get the excel file name: Using the Right function

Right function is another handy way to look for the file name in excel They syntax of this function is

=RIGHT(CELL(filename,A2),LEN(CELL(filename,A2))-FIND(], CELL(filename,A2)))

1.It’s another way to know the name of sheet inside the file  just like above, now let’s apply this function and see it’s result.

2.The result is the sheet on which we are currently working

Did you learn about how to get the excel file name using different methods. You can follow WPS academy to learn more features of Word document, Excel Spread sheets, and power point slides.

You can also download WPS office to edit the word documents , Excel Spread sheets, and PowerPoint free of cost. Download Now! And get an enjoyable working space.

 

 

15 years of office industry experience, tech lover and copywriter. Follow me for product reviews, comparisons, and recommendations for new apps and software.