=INFO("directory") is wrong

W

warnimont

=INFO("directory") almost never returns the correct path.
It seems the 1st time i enter the function it works. Than
after saving or any other change it brings back an
incorrect path. Here's an example. THis file is in My
Documents.

C:\Program Files\Common Files\System\Mapi\1033\NT\
 
P

Peo Sjoblom

Use cell function

=CELL("filename",A1) will give you path and filename and active sheet, if
you only want path to the folder use

=LEFT(CELL("filename",A1),FIND("[",CELL("filename",A1))-1)

will give you path with the folder included but not filename

Note that A1 will work in any cell so you don't have to change that to any
other cell reference

Also the workbook has to be save for this to work
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top