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

Data Analysis

  • Add Outline to Data in Excel
  • How to create a Histogram in Excel
  • Conditional Formatting New Rule with Formulas in Excel
  • How to Use Solver Tool in Excel
  • Filter Data Based on Date in Excel

References

  • How to get address of last cell in range in Excel
  • Complete List of Excel Lookup and Reference Functions, References and Examples
  • Merge tables with VLOOKUP in Excel
  • CHOOSE function: Description, Usage, Syntax, Examples and Explanation
  • Find closest match in Excel

Data Validations

  • Excel Data validation with conditional list
  • Excel Data validation exists in list
  • Data validation must not exist in list
  • How To Create Drop-down List in Excel
  • Excel Data validation allow weekday only

How to get Excel workbook path only

by

If you want to get the workbook path (directory) only, you can do so with a formula that uses the LEFT and the FIND function. The result will look something like this:

Drive:\path\to\file\   //Windows
Drive:path:to:file:    //Mac

Formula

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

Explanation

How the formula works

The cell function is used to get the full file name and path:

CELL("filename",A1)

The result looks like this:

path[workbook.xlsm]sheet

The full file name and path are fed into the LEFT function, which is used to extract just the full directory path.

The number of characters to extract by locating the the position of the left square bracket “[” with FIND and subtracting 1:

FIND("[",CELL("Filename",A1))-1

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
  • XOR function: Description, Usage, Syntax, Examples and Explanation
  • Nested IF function example in Excel
  • AND function: Description, Usage, Syntax, Examples and Explanation
  • OR function Examples in Excel

Date Time

  • Calculate time difference in hours as decimal value in Excel
  • TIME function: Description, Usage, Syntax, Examples and Explanation
  • Display Days in month in Excel
  • Count dates in current month in Excel
  • Get age from birthday in Excel

Grouping

  • Map inputs to arbitrary values in Excel
  • Group times into unequal buckets in Excel
  • How to randomly assign data to groups in Excel
  • Group numbers at uneven intervals in Excel
  • Running count group by n size in Excel

General

  • Find, Trace and Correct Errors in Excel Formulas using ‘Formula Auditing’
  • How to fill cell ranges with random number from fixed set of options in Excel
  • Creating and Opening an existing file in Excel
  • Find, Select, Replace and Go To Special in Excel
  • 231 Keyboard Shortcut Keys In Excel
© 2026 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning