Excel Tutorial
Excel tutorials, quizzes & AI guides — all levels
RSS
  • Online Excel Exercises
  • Training
  • Excel Tests
  • Sitemap
  • Premium Quizzes
  • Shop
  • My account

Excel Extract Worksheet Name by formula

Manage data
Reading time: 2 minutes
Views: 6,808

Extract the worksheet name with a formula it’s possible in Excel.

  1. Use the CELL function to return the full path, including the worksheet name.
  2. Then, use the TEXTAFTER function to extract only the worksheet name.
  3. If you don’t have Excel 365, there is another technique to extract the filename from the string.

The CELL function

The CELL function automatically returns file properties, such as the full path, worksheet name, and cell address. This function helps you get dynamic information about a cell or the workbook.

The CELL function is different from the INFO function. The INFO function returns details about the system, such as the Excel version or memory availability.

  • To extract the worksheet name, use the “filename” option in the CELL function.
  • ⚠️ Make sure the file is saved. If not, the CELL function returns nothing.

When saved, the function returns this information in the following order:

  1. Path of the file, here C:\Log\
  2. File name between brackets [Extract Worksheet name.xlsx]
  3. Worksheet name Tuesday
CELL function extracts the filename

How to extract the worksheet name?

Next, you will isolate the worksheet name from the previous string. We must extract the substring after the ] character.

The TEXTAFTER function

The TEXTAFTER function is available exclusively in Excel 365 and Excel Online. It’s easy to use—just specify the character that comes before the substring you want to extract. Here’s the full formula:

Extract of the worksheet name with TEXTAFTER function

For all the other Excel versions

If you’re not using Excel 365, there’s still a way to extract the text after the ‘ ] ‘. This alternative method uses a combination of functions:

  • LEN to get the total length of the string
  • SEARCH to locate the position of the ‘ ] ‘
  • And finally, the RIGHT function to extract the desired substring
Extract worksheet name with the RIGTH LEN SEARCH functions

Both methods help you extract the worksheet name dynamically with a formula.

Related articles

  • INDIRECT function to create a dynamic reference
  • How to copy a worksheet to another workbook
  • Merge multiple Excel files into one workbook
  • Tips to Move and Copy Worksheet in Excel

Frédéric LE GUEN

worksheet

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Most Viewed Posts

  • Displaying Negative Numbers in Parentheses in Excel (310,065)
  • Top 10 Excel Functions You Must Know (232,001)
  • How to make automatic calendar in Excel (212,775)
  • Dash for a zero in Excel automatically (190,813)
  • Converting a Date from YYYYMMDD to DD/MM/YYYY in Excel (171,034)
image excel exercises
Excel Exercises
image excel quizzes
Excel Quizzes

Excel Extract Worksheet Name by formula

Reading time: 2 minutes
Views: 6,808

Extract the worksheet name with a formula it’s possible in Excel.

  1. Use the CELL function to return the full path, including the worksheet name.
  2. Then, use the TEXTAFTER function to extract only the worksheet name.
  3. If you don’t have Excel 365, there is another technique to extract the filename from the string.

The CELL function

The CELL function automatically returns file properties, such as the full path, worksheet name, and cell address. This function helps you get dynamic information about a cell or the workbook.

The CELL function is different from the INFO function. The INFO function returns details about the system, such as the Excel version or memory availability.

  • To extract the worksheet name, use the “filename” option in the CELL function.
  • ⚠️ Make sure the file is saved. If not, the CELL function returns nothing.

When saved, the function returns this information in the following order:

  1. Path of the file, here C:\Log\
  2. File name between brackets [Extract Worksheet name.xlsx]
  3. Worksheet name Tuesday
CELL function extracts the filename

How to extract the worksheet name?

Next, you will isolate the worksheet name from the previous string. We must extract the substring after the ] character.

The TEXTAFTER function

The TEXTAFTER function is available exclusively in Excel 365 and Excel Online. It’s easy to use—just specify the character that comes before the substring you want to extract. Here’s the full formula:

Extract of the worksheet name with TEXTAFTER function

For all the other Excel versions

If you’re not using Excel 365, there’s still a way to extract the text after the ‘ ] ‘. This alternative method uses a combination of functions:

  • LEN to get the total length of the string
  • SEARCH to locate the position of the ‘ ] ‘
  • And finally, the RIGHT function to extract the desired substring
Extract worksheet name with the RIGTH LEN SEARCH functions

Both methods help you extract the worksheet name dynamically with a formula.

Related articles

  • INDIRECT function to create a dynamic reference
  • How to copy a worksheet to another workbook
  • Merge multiple Excel files into one workbook
  • Tips to Move and Copy Worksheet in Excel
Tags: worksheet

Frédéric LE GUEN

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Contact us
About me 
Privacy Policy

© 2022 – 2026 – excel-tutorial.com. All Rights Reserved.
Excel Tutorial is managed by majordome du net

Contact us
About me 
Privacy Policy

© 2022 – 2026 – excel-tutorial.com. All Rights Reserved.
Excel Tutorial is managed by majordome du net