filename and function

  • Thread starter Thread starter Jonas
  • Start date Start date
J

Jonas

Hi,
does anyone know about a way to add an workbooks own name
inte an empty cell?

I have thousends of files to process and I need the name
of the file to appear in one empty cell together with my
data.

Thanks in advance

Jonas
 
Jonas,

Don't quite understand why you need the name in a cell when processing
thousands , but this formula puts the full name in a cell

=SUBSTITUTE(SUBSTITUTE(LEFT(CELL("filename",A1),FIND("]",CELL("filename",A1)
)),"[",""),"]","")

The A1 is not relevant, it just anchors the formula to that worksheet
 
One way,

=MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND("]",CELL("file
name",A1))-FIND("[",CELL("filename",A1))-1)
 
Back
Top