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

Data Analysis

  • Randomize/ Shuffle List in Excel
  • How to Create One and Two Variable Data Tables in Excel
  • Subtotal function in Excel
  • Everything about Charts in Excel
  • Conditional Formatting Icon Sets Examples in Excel

References

  • Create hyperlink with VLOOKUP in Excel
  • Count rows that contain specific values in Excel
  • MATCH function: Description, Usage, Syntax, Examples and Explanation
  • How to get last column number in range in Excel
  • Excel Advanced Lookup using Index and Match Functions

Data Validations

  • Excel Data validation whole percentage only
  • How To Create Drop-down List in Excel
  • Excel Data validation no punctuation
  • Excel Data validation exists in list
  • Excel Data validation don’t exceed total

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

  • XOR function: Description, Usage, Syntax, Examples and Explanation
  • IF with wildcards in Excel
  • How to return blank in place of #DIV/0! error in Excel
  • IF function: Description, Usage, Syntax, Examples and Explanation
  • IFERROR function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • Count holidays between two dates in Excel
  • Display Date is same month in Excel
  • Add years to date in Excel
  • MONTH function: Description, Usage, Syntax, Examples and Explanation
  • Calculate retirement date in Excel

Grouping

  • How to randomly assign people to groups in Excel
  • Group times into 3 hour buckets in Excel
  • Map text to numbers in Excel
  • Calculate conditional mode with criteria in Excel
  • Group numbers at uneven intervals in Excel

General

  • How to get Excel workbook path only
  • How to Create Calendar in Excel
  • Excel Autofill Cell Ranges, Copy, Paste
  • How to generate random number between two numbers in Excel
  • 44 Practical Excel IF function Examples
© 2026 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning