Insert File name in Excel File

S

sk.shafiqul

Hi,

I have insert file name in my execl file by using below formula

=MID(CELL("filename"),SEARCH("[",CELL("filename"))+1,SEARCH("]",CELL("filename"))-SEARCH("[",CELL("filename"))-24)

it is working nicely. But when i opening multiple file at a time, the
all file name are showing same name-
like
(may file name) 571 RU__274880__S.SUHI-47
when i open another file like this file 572 CH__274880__S.SUHI-47 the
all file name should be shown same name like 571 RU____ etc.

So, please hel
 
C

Claus Busch

Hi,

Am Mon, 8 Oct 2012 04:46:24 +0000 schrieb sk.shafiqul:
=MID(CELL("filename"),SEARCH("[",CELL("filename"))+1,SEARCH("]",CELL("filename"))-SEARCH("[",CELL("filename"))-24)

it is working nicely. But when i opening multiple file at a time, then
all file name are showing same name-

you have to refer to your workbook. Try:
=MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND("]",CELL("filename",A1))-FIND("[",CELL("filename",A1))-1)


Regards
Claus Busch
 

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