This is from Frank Kabel in a response to someone else's post on the
same question in the Excel General forum.
=MID(CELL("filename",A1),FIND("[",CELL("filename",A1),1)+1,FIND("]",CELL("filename",A1),1)-FIND("[",CELL("filename",A1),1)-1)
I tried it and it works great. Just copy/paste this formula.
Frank also advised that the file has to saved/named before doing this.