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

Data Analysis

  • How to do a t-Test in Excel?
  • Chart Axes in Excel
  • Randomize/ Shuffle List in Excel
  • How to sum a total in multiple Excel tables
  • Conditional Formatting Icon Sets Examples in Excel

References

  • Extract data with helper column in Excel
  • Two-way lookup with VLOOKUP in Excel
  • Offset in Excel
  • MATCH function: Description, Usage, Syntax, Examples and Explanation
  • How to calculate two-way lookup VLOOKUP in Excel Table

Data Validations

  • Excel Data validation must begin with
  • Excel Data validation must contain specific text
  • Excel Data validation with conditional list
  • Excel Data validation whole percentage only
  • Prevent invalid data entering in specific cells

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 return blank in place of #DIV/0! error in Excel
  • Nested IF function example in Excel
  • Complete List of Excel Logical Functions, References and Examples
  • IFNA function: Description, Usage, Syntax, Examples and Explanation
  • IF with wildcards in Excel

Date Time

  • Count dates in current month in Excel
  • Basic timesheet formula with breaks in Excel
  • DAYS360 function: Description, Usage, Syntax, Examples and Explanation
  • Calculate number of hours between two times in Excel
  • Get last day of month in Excel

Grouping

  • Calculate conditional mode with criteria in Excel
  • Group numbers at uneven intervals in Excel
  • If cell contains one of many things in Excel
  • Running count group by n size in Excel
  • Categorize text with keywords in Excel

General

  • How to calculate percentage discount in Excel
  • How to calculate project complete percentage in Excel
  • Zoom Worksheet in Excel
  • Basic numeric sort formula in Excel
  • Excel Autofill Cell Ranges, Copy, Paste
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning