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

Data Analysis

  • How to Create Gantt Chart in Excel
  • Managing Conditional Formatting Rules in Excel
  • How to Create One and Two Variable Data Tables in Excel
  • How to add Trendline to a chart in Excel
  • How To Load Analysis ToolPak in Excel

References

  • Vlookup Examples in Excel
  • How to use Excel VLOOKUP Function
  • How to get last row in mixed data with blanks in Excel
  • Find Closest Match in Excel Using INDEX, MATCH, ABS and MIN functions
  • CHOOSE function: Description, Usage, Syntax, Examples and Explanation

Data Validations

  • Excel Data validation whole percentage only
  • Excel Data validation allow uppercase only
  • Excel Data validation require unique number
  • Excel Data validation must not contain
  • Excel Data validation only dates between

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

  • Check multiple cells are equal in Excel
  • SWITCH function: Description, Usage, Syntax, Examples and Explanation
  • OR function: Description, Usage, Syntax, Examples and Explanation
  • Return blank if in Excel
  • IFERROR function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • Pad week numbers with zeros in Excel
  • Get last weekday in month in Excel
  • Calculate series of dates by workdays in Excel
  • How to get year from date in Excel
  • How to calculate nth day of year in Excel

Grouping

  • Group arbitrary text values in Excel
  • Map text to numbers in Excel
  • Map inputs to arbitrary values in Excel
  • Running count group by n size in Excel
  • How to randomly assign data to groups in Excel

General

  • Check if multiple cells have same value with case sensitive in Excel
  • Count cells that do not contain errors in Excel
  • How to add sequential row numbers to a set of data in Excel
  • How to fill cell ranges with random text values in Excel
  • With vs Without Array Formula in Excel
© 2026 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning