How do I insert the file name into a chart (without typing it)?

D

Dave Curtis

Hi,
One way is to enter the following formula in a spare cell on your sheet, A1,
for instance,

=MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND("]",CELL("filename",A1))-FIND("[",CELL("filename",A1))-1)

which will give you the filename in A1. Then you can reference that cell in
your chart title.

If you have the morefunc add-in, you could just use =FILENAME(FALSE) instead.

Note that the file has to have actually been savedin order to return the
filename in the cell.

Dave
 
A

Andy Pope

Hi,

You could use an embedded textbox linked to a cell. With the cell containing
the formula,

=MID(LEFT(CELL("Filename",A1),FIND("]",CELL("Filename",A1))-1),
FIND("[",CELL("Filename",A1))+1, 255)

the workbook needs to have been saved for this to work.

Cheers
Andy
 

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