Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • Subtotal function in Excel
  • Get column name from index in Excel Table
  • Excel Pie Chart
  • Data Series in Excel
  • How to create Checklist in Excel

References

  • Two-way lookup with VLOOKUP in Excel
  • Merge tables with VLOOKUP in Excel
  • How to use Excel VLOOKUP Function
  • Count unique text values with criteria
  • How to use Excel LOOKUP Function

Data Validations

  • Data validation must not exist in list
  • Excel Data validation must contain specific text
  • Excel Data validation don’t exceed total
  • How To Create Drop-down List in Excel
  • Excel Data validation date in next 30 days

Get workbook name and path without sheet in Excel

by

If you want to get the current workbook’s full name and path without a sheet name, you can use a formula that employs several text functions to strip off the sheet name. The final result will be a text string that looks like this:

path[workbook.xlsm]

Formula

=SUBSTITUTE( LEFT(CELL("filename",A1),FIND("]",CELL("filename",A1))-1),"[","")

Explanation

How the formula works

The CELL function is used with “filename” to get the full workbook name and path:

CELL("filename",A1)

The result is a full path that looks like this:

path[workbook.xlsm]sheetname

The LEFT function receives the full path as text, along with the the location of square bracket “]” (minus 1) which is calculated by the find function:

FIND("]",CELL("filename",A1))

With these arguments, LEFT effectively strips off the sheet name out of the path. However, the left square bracket “]” remains:

path[workbook.xlsm

The final function, SUBSTITUTE, removes the “]” by replacing it with an empty string (“”).

=SUBSTITUTE(path[workbook.xlsm,"[","")

 

Post navigation

Previous Post:

DECIMAL function: Description, Usage, Syntax, Examples and Explanation

Next Post:

AVERAGE function: Description, Usage, Syntax, Examples and Explanation

Leave a Reply Cancel reply

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

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • OR function: Description, Usage, Syntax, Examples and Explanation
  • Excel If, Nested If, And/Or Criteria Examples
  • IFNA function: Description, Usage, Syntax, Examples and Explanation
  • How to use Excel FALSE Function
  • How to use Excel AND Function

Date Time

  • SECOND function: Description, Usage, Syntax, Examples and Explanation
  • Excel Date & Time Functions Example
  • DAYS function: Description, Usage, Syntax, Examples and Explanation
  • Get first day of month in Excel
  • How to get number of days, weeks, months or years between two dates in Excel

Grouping

  • Categorize text with keywords in Excel
  • Calculate conditional mode with criteria in Excel
  • How to randomly assign people to groups in Excel
  • Group arbitrary text values in Excel
  • Group numbers at uneven intervals in Excel

General

  • Advanced Number Formats in Excel
  • 3D SUMIF for multiple worksheets in Excel
  • How to calculate percent variance in Excel
  • Sum by group in Excel
  • Subtotal invoices by age in Excel
© 2026 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning