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

Data Analysis

  • How to Sort by Color in Excel
  • Subtotal function in Excel
  • How To Compare Two Lists in Excel
  • How to Create Area Chart in Excel
  • Chart Axes in Excel

References

  • Create hyperlink with VLOOKUP in Excel
  • Excel Advanced Lookup using Index and Match Functions
  • How to create dynamic named range with OFFSET in Excel
  • Extract all partial matches in Excel
  • How to get last column number in range in Excel

Data Validations

  • Excel Data validation with conditional list
  • Excel Data validation require unique number
  • Excel Data validation unique values only
  • Excel Data validation must begin with
  • Excel Data validation must not contain

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

  • Invoice status with nested if in Excel
  • FALSE function: Description, Usage, Syntax, Examples and Explanation
  • How to use Excel OR Function
  • How to use Excel TRUE Function
  • How to use Excel AND Function

Date Time

  • Basic Overtime Calculation Formula in Excel
  • Convert Excel time to Unix time in Excel
  • How to calculate Day of the Year in Excel
  • Convert decimal seconds to Excel time
  • TIMEVALUE function: Description, Usage, Syntax, Examples and Explanation

Grouping

  • If cell contains one of many things in Excel
  • Calculate conditional mode with criteria in Excel
  • Group times into 3 hour buckets in Excel
  • Map inputs to arbitrary values in Excel
  • How to randomly assign people to groups in Excel

General

  • 3D SUMIF for multiple worksheets in Excel
  • Mark Workbook as Final in Excel
  • Check if multiple cells have same value with case sensitive in Excel
  • Count cells that contain errors in Excel
  • Convert column number to letter in Excel
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning