How to Extract Worksheet Name and Date Using Excel CELL Formula
Question details
The user needs to extract the worksheet name and specific date information from each sheet independently using a 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.
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.
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.
Click on the cell where you want the extracted date to appear.
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)`
Press Enter. The formula will parse the sheet name, extract the specific characters corresponding to the date, and format them with slashes.

Use the LET Function for a Cleaner Formula
If you are using Microsoft 365 or Office 2021, you can use the LET function to store the filename and sheet name as variables, significantly shortening the formula.
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. Open your workbook: Launch WPS Spreadsheet and open your document.
- 2. Save the file: Ensure the document is saved locally so the CELL function can detect the filename.
- 3. Enter the formula: Select an empty cell and enter the anchored formula: `=CELL("filename", A1)` combined with your text-extraction logic.
- 4. Press Enter: Hit Enter to instantly extract the active sheet's name and date.

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.




