Add filename in a new column

O

OnlineWealth

Is it possible to add the actual name of the file in a new column when I
open each file with Excel.

I have multiple files that I need to have the file name included with
each row within the file.

So, I'd like to be able to just open each file and it automatically
inserts a new column and includes the file name in each cell for every
row.

Is this possible?

Thanks,

Mike
 
T

tkt_tang

Say, =Cell("Filename",A1) to be placed in worksheet cell A1.

Please refer to the Help file for details. Regards.
 
O

OnlineWealth

Thanks that helps, although it also includes the path of the file i.e.
C:\Folder\Filename.

Would you happen to know how to exclude that in the code?

Thanks,

Mik
 
O

OnlineWealth

Thanks that helps, although it also includes the path of the file i.e.
C:\Folder\Filename.

Would you happen to know how to exclude that in the code?

Thanks,

Mik
 
Top