Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
i want to insert the file name in a cell, how do I do this
|
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
i want to insert the file name in a cell, how do I do this
Try this:
=MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND("]",CELL("filename",A1))-FIND("[",CELL("filename",A1))-5) Enter the formula in any cell on any sheet. The file must have been saved at least once for it to work. Do not change anything in the formula. -- Biff Microsoft Excel MVP "JCB" wrote in message ... |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
i want to insert the file name in a cell, how do I do this
Hi,
Sorry to piggy back on your answer, but since to OP didn't include anything in the body of the post I can't reply using the web interface. =MID(CELL("filename"),FIND("[",CELL("filename"))+1,FIND("]",CELL("filename"))-FIND("[",CELL("filename"))-1) This is a great time to create a range name, say F which is =CELL("filename"), then the formula would be =MID(F,FIND("[",F)+1,FIND("]",F)-FIND("[",F)-1) -- If this helps, please click the Yes button Cheers, Shane Devenshire "T. Valko" wrote: Try this: =MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND("]",CELL("filename",A1))-FIND("[",CELL("filename",A1))-5) Enter the formula in any cell on any sheet. The file must have been saved at least once for it to work. Do not change anything in the formula. -- Biff Microsoft Excel MVP "JCB" wrote in message ... |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
i want to insert the file name in a cell, how do I do this
Without the reference to a cell in the worksheet/workbook, then this formula:
=CELL("filename") will return info about the workbook that is active when excel recalculates. Adding a reference to a cell in the workbook/worksheet with the formula will make this problem go away: =CELL("filename",A1) (I like to use the cell that contains the formula) Shane Devenshire wrote: Hi, Sorry to piggy back on your answer, but since to OP didn't include anything in the body of the post I can't reply using the web interface. =MID(CELL("filename"),FIND("[",CELL("filename"))+1,FIND("]",CELL("filename"))-FIND("[",CELL("filename"))-1) This is a great time to create a range name, say F which is =CELL("filename"), then the formula would be =MID(F,FIND("[",F)+1,FIND("]",F)-FIND("[",F)-1) -- If this helps, please click the Yes button Cheers, Shane Devenshire "T. Valko" wrote: Try this: =MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND("]",CELL("filename",A1))-FIND("[",CELL("filename",A1))-5) Enter the formula in any cell on any sheet. The file must have been saved at least once for it to work. Do not change anything in the formula. -- Biff Microsoft Excel MVP "JCB" wrote in message ... -- Dave Peterson |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
i want to insert the file name in a cell, how do I do this
Sorry to piggy back on your answer
Biting my tongue -- Biff Microsoft Excel MVP "Shane Devenshire" wrote in message ... Hi, Sorry to piggy back on your answer, but since to OP didn't include anything in the body of the post I can't reply using the web interface. =MID(CELL("filename"),FIND("[",CELL("filename"))+1,FIND("]",CELL("filename"))-FIND("[",CELL("filename"))-1) This is a great time to create a range name, say F which is =CELL("filename"), then the formula would be =MID(F,FIND("[",F)+1,FIND("]",F)-FIND("[",F)-1) -- If this helps, please click the Yes button Cheers, Shane Devenshire "T. Valko" wrote: Try this: =MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND("]",CELL("filename",A1))-FIND("[",CELL("filename",A1))-5) Enter the formula in any cell on any sheet. The file must have been saved at least once for it to work. Do not change anything in the formula. -- Biff Microsoft Excel MVP "JCB" wrote in message ... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Insert file name in cell without .xls extension | Excel Discussion (Misc queries) | |||
how do I insert a sequential number to a cell each time the file i | New Users to Excel | |||
How can I insert the author name held in File/Properties in a cell | Excel Discussion (Misc queries) | |||
I want to insert the file properties into a cell for printing. | Excel Discussion (Misc queries) | |||
How do I insert in a cell a link to display a JPG file in window | Setting up and Configuration of Excel |