{"id":12093,"date":"2011-11-20T10:01:04","date_gmt":"2011-11-20T10:01:04","guid":{"rendered":"http:\/\/www.learnexcelmacro.com\/?p=752"},"modified":"2011-11-20T10:01:04","modified_gmt":"2011-11-20T10:01:04","slug":"file-name-formula","status":"publish","type":"post","link":"https:\/\/vmlogger.com\/excel\/2011\/11\/file-name-formula\/","title":{"rendered":"File Name Formula"},"content":{"rendered":"

There are few instances when we want to store the File Name or Current Workbook Name in a particular Cell. This is very easy. This can be done by using Cell() <\/strong> function as shown below:
\n<\/strong><\/p>\n

Syntax:<\/strong> =CELL(“filename”)<\/span>
\nReturned Value:<\/strong> C:\\Users\\Vish\\Desktop\\[Test.xlsx]Sheet1<\/span><\/p>\n

Note:<\/strong> The problem with this is that it gives the complete path including Drive and folders with Sheet Name.<\/em><\/span><\/p>\n