View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.charting
Dave Curtis[_2_] Dave Curtis[_2_] is offline
external usenet poster
 
Posts: 99
Default How do I insert the file name into a chart (without typing it)?

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