View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default file name and path in worksheet

You can simplify your use of the CELL function, by removing the second
argument


As long as you don't have multiple files open at the same time. Using A1 as
the 2nd argument "anchors" the formula to the file the formula is entered
in.

Try it without the 2nd argument then open another file.

--
Biff
Microsoft Excel MVP


"ShaneDevenshire" wrote in
message ...
Hi,

You can simplify your use of the CELL function, by removing the second
argument, so the longest of the suggested formulas becomes:

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

And since we call the CELL("filename") funtion four times a range name
like
F would simplify this to

=MID(F,FIND("[",F)+1,FIND("]",F)-FIND("[",F)-1)

You can make a name out of the function by choose Insert, Name, Define and
entering F in the Names in workbook box and =CELL("filename") in the
Refers
to box.

--
Thanks,
Shane Devenshire


"april" wrote:

is there a way to insert the file name and path in a worksheet - i'm not
talking about the footer in the print setup. i am looking for something
like
the NOW function.

thanks
--
aprilshowers