View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Eduardo Eduardo is offline
external usenet poster
 
Posts: 2,276
Default macro to grab current workbook filename

Hi,
In cell A2 enter

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

If this helps please click yes, thanks

"TR Young" wrote:

Excel 2003:
I need a macro that grabs the current workbook filename and drops it into
cell A2. I know this is simple, but my head is fried this evening....