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
  • Calculate Conditional Percentile ‘IF’ in table in Excel
  • Example of COUNTIFS with variable table column in Excel
  • Excel Line Chart
  • How to create a Histogram in Excel

References

  • How to get last row in numeric data in Excel
  • Left Lookup in Excel
  • How to get first column number in range in Excel
  • How to use Excel INDIRECT Function
  • How to use Excel VLOOKUP Function

Data Validations

  • Excel Data validation date in specific year
  • Excel Data validation date in next 30 days
  • Excel Data validation allow uppercase only
  • Excel Data validation no punctuation
  • Excel Data validation specific characters 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 use Excel OR Function
  • IFERROR function: Description, Usage, Syntax, Examples and Explanation
  • IF function: Description, Usage, Syntax, Examples and Explanation
  • Excel If, Nested If, And/Or Criteria Examples
  • Nested IF function example in Excel

Date Time

  • Calculate retirement date in Excel
  • Get fiscal quarter from date in Excel
  • Find Last Day of the Month in Excel
  • Get first day of month in Excel
  • EDATE function: Description, Usage, Syntax, Examples and Explanation

Grouping

  • Running count group by n size in Excel
  • Map inputs to arbitrary values in Excel
  • Group numbers at uneven intervals in Excel
  • Calculate conditional mode with criteria in Excel
  • Map text to numbers in Excel

General

  • Excel Ribbon Quick Overview For Beginners
  • How to count total columns in range in Excel
  • Index and match on multiple columns in Excel
  • Sum by group in Excel
  • Subtotal by color in Excel
© 2026 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning