filename and function

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
 
B

Bob Phillips

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
 
P

Peo Sjoblom

One way,

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top