logo
search
Function Problems

How to Extract Worksheet Name and Date Using Excel CELL Formula

Elise WilliamsElise Williams Oct 10, 2026 869 views

Question details

The user needs to extract the worksheet name and specific date information from each sheet independently using a formula.

How to Extract Worksheet Name and Date Using Excel CELL Formula
Product
Excel
Device & OS
not provided
Scenario
Pulling sheet names and parsing dates from multiple worksheet tabs without the formula incorrectly returning the name of the active sheet instead of the sheet where the formula resides.
Observed behavior
When the CELL function is used without a cell reference, it defaults to the last active sheet, causing all sheets to incorrectly display the same extracted worksheet name and date.
Before you start

Ensure that your Excel workbook has been saved to your local drive or cloud storage. The CELL function cannot return a filename or worksheet name if the document has never been saved.

Solution 1Recommended

Add a Cell Reference to the CELL Function

Adding a specific cell reference (such as A1) forces the CELL function to evaluate the worksheet where the formula is placed, rather than relying on the active sheet.

By default, if you omit the cell reference argument in the CELL function, Excel pulls information from the currently active cell in the active worksheet. To extract the correct date components independently on multiple sheets, you must anchor it.

1
Select the target cell

Click on the cell where you want the extracted date to appear.

2
Input the text extraction formula

Enter the following formula, ensuring you include 'A1' as the reference: `=MID(TRIM(MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)),6,2)&"/"&MID(TRIM(MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)),8,2)&"/"&MID(TRIM(MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)),4,2)`

3
Apply the formula

Press Enter. The formula will parse the sheet name, extract the specific characters corresponding to the date, and format them with slashes.

Add a Cell Reference to the CELL Function
Reference Anchoring: Including 'A1' guarantees that even when you switch tabs or recalculate the workbook, the formula will always pull the name of the sheet it is typed in.

Extract Sheet Information Seamlessly with WPS Spreadsheet

WPS Office fully supports advanced dynamic array functions and text extraction functions like CELL, MID, FIND, and LET. You can easily manage and extract worksheet names and dates without compatibility issues.

  1. 1. Open your workbook: Launch WPS Spreadsheet and open your document.
  2. 2. Save the file: Ensure the document is saved locally so the CELL function can detect the filename.
  3. 3. Enter the formula: Select an empty cell and enter the anchored formula: `=CELL("filename", A1)` combined with your text-extraction logic.
  4. 4. Press Enter: Hit Enter to instantly extract the active sheet's name and date.
Fully supports CELL, MID, FIND, and LET formulas100% compatible with Microsoft Excel (.xlsx) formatsLightweight, fast, and completely free to use
microsoft office alternative - wps office

Frequently Asked Questions

Why does my CELL formula return an empty string?

If your workbook has never been saved to a hard drive or cloud storage, the `CELL("filename", A1)` function cannot retrieve a file path and will return a blank value. Save the file first and press F9 to recalculate.

Why does the formula show the name of a different worksheet?

This happens if you omit the cell reference and simply use `CELL("filename")`. Excel will return the name of the last actively edited sheet. To fix this, always include a cell reference, such as `A1`, inside the function.

Does the LET function work in older versions of Excel?

No, the LET function is exclusively available in newer versions like Microsoft 365, Office 2021, and newer iterations. For older versions like Office 2016 or 2019, you must use the longer, nested MID/FIND formula.