Insert file name in cells

M

Mohan De Silva

I need to insert the file name in a cell of the work page (with a funtion)
and be able to change automatically if & when the file name id edited. I Use
this on a cover page .
 
A

Ashish Mathur

Deare De Silva,

Try the following array formula (Ctrl+Shift+Enter)

=MID(CELL("filename"),MATCH("[",MID(CELL("filename"),ROW(1:150),1),0)+1,MATCH(".",MID(CELL("filename"),ROW(1:150),1),0)-MATCH("[",MID(CELL("filename"),ROW(1:150),1),0)-1)

WHen you change the filename, i guess you would have to vlose and reopen the
file.

Regards,

Ashish Mathur
 
M

Mohan De Silva

Hello Ashish,

Tried entering the formula, but give result #VALUE!. What do you mean by
(Ctrl+Shift+Enter) is this to be done in the cell before entering the formula
??

Thanks & appreciate assistance
Mohan De Silva


Ashish Mathur said:
Deare De Silva,

Try the following array formula (Ctrl+Shift+Enter)

=MID(CELL("filename"),MATCH("[",MID(CELL("filename"),ROW(1:150),1),0)+1,MATCH(".",MID(CELL("filename"),ROW(1:150),1),0)-MATCH("[",MID(CELL("filename"),ROW(1:150),1),0)-1)

WHen you change the filename, i guess you would have to vlose and reopen the
file.

Regards,

Ashish Mathur

Mohan De Silva said:
I need to insert the file name in a cell of the work page (with a funtion)
and be able to change automatically if & when the file name id edited. I Use
this on a cover page .
 
R

RagDyer

Check out this web page of John McGimpsey on the subject:

http://www.mcgimpsey.com/excel/formulae/cell_function.html

--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


Mohan De Silva said:
Hello Ashish,

Tried entering the formula, but give result #VALUE!. What do you mean by
(Ctrl+Shift+Enter) is this to be done in the cell before entering the formula
??

Thanks & appreciate assistance
Mohan De Silva


Ashish Mathur said:
Deare De Silva,

Try the following array formula (Ctrl+Shift+Enter)
=MID(CELL("filename"),MATCH("[",MID(CELL("filename"),ROW(1:150),1),0)+1,MATC
H(".",MID(CELL("filename"),ROW(1:150),1),0)-MATCH("[",MID(CELL("filename"),R
OW(1:150),1),0)-1)
WHen you change the filename, i guess you would have to vlose and reopen the
file.

Regards,

Ashish Mathur
 
C

CLR

=CELL("filename",A1)

File must be saved before it will work......

Vaya con Dios,
Chuck, CABGx3
 
Top