Hello Friends, Welcome to dptutorials If you want a cell to return the name of a workbook, or the workbook's filename and path. Then this is the tutorial to watch out. In this tutorial, let us use a small macro to retrieve the workbook’s name, file path, and sheet name. We can do the same trick using the formulae. Right click on the sheet tab and click on view code, or press Alt+F11 to go to VBA window. Select insert, module Copy this code and paste into this module, Function WorkbookName() As String WorkbookName = ThisWorkbook.Name End Function Function Filepath() As String Filepath = ThisWorkbook.FullName End Function Function SheetName(rAnyCell) Application.Volatile SheetName = rAnyCell.Parent.Name End Function Close this VBA window and go back to the Excel window. Go to Formulas tab, click on insert function, under the category, and select the user-defined, you will find three functions Filepath, sheet name, and workbook name. If you click on file path ...
A Project Management Blog with free video tutorials and setups on various tools to enrich your knowledge in project management skills and much more softwares