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

Data Analysis

  • How to calculate average last N values in a table in Excel
  • Reverse List in Excel
  • How to Create Area Chart in Excel
  • Add Outline to Data in Excel
  • Error Bars in Excel

References

  • How to use Excel MATCH Function
  • Basic INDEX MATCH approximate in Excel
  • Offset in Excel
  • How to calculate two-way lookup VLOOKUP in Excel Table
  • Multi-criteria lookup and transpose in Excel

Data Validations

  • Excel Data validation no punctuation
  • Excel Data validation exists in list
  • Excel Data validation date in specific year
  • Excel Data validation only dates between
  • Excel Data validation specific characters only

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

  • How to use IFS function in Excel
  • AND function: Description, Usage, Syntax, Examples and Explanation
  • FALSE function: Description, Usage, Syntax, Examples and Explanation
  • IF with wildcards in Excel
  • IFS function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • Custom weekday abbreviation in Excel
  • Get work hours between dates and times in Excel
  • Extract date from a date and time in Excel
  • How to calculate nth day of week in month in Excel
  • Check If Two Dates are same month in Excel

Grouping

  • How to randomly assign people to groups in Excel
  • Group numbers at uneven intervals in Excel
  • Group times into 3 hour buckets in Excel
  • Running count group by n size in Excel
  • Group numbers with VLOOKUP in Excel

General

  • Excel Ribbon Quick Overview For Beginners
  • How to calculate percentage discount in Excel
  • Split Cell Content Using Text to Columns in Excel
  • How to make excel worksheets print on one page?
  • How to count total columns in range in Excel
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning