View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Sandy V[_6_] Sandy V[_6_] is offline
external usenet poster
 
Posts: 37
Default Excel filename into cell


With a formula for a Saved file, there are various ways
such as:

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

above as one line

Or with vba,

Sub test2()

Range("A1").Value = ActiveWorkbook.Name
End Sub

Regards,
Sandy

-----Original Message-----
Hi,

Is it possible to get the filename of an excel-file into

cel A1?

Thanks


.