![]() |
Displaying the filename in a cell
Is there any way of displaying the filename of the spreadsheet in a cell
within the workbook? If not then how simple is it to create a user defined function to do this? Any help would be much appreciated. Thanks, Bhupinder Rayat |
Displaying the filename in a cell
Bhupinder, try this in a cell, workbook has to be saved first
=MID(LEFT(CELL("filename",A1), FIND("]", CELL("filename",A1))-1),FIND("[", CELL("filename",A1))+1, 255) -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "Bhupinder Rayat" wrote in message ... Is there any way of displaying the filename of the spreadsheet in a cell within the workbook? If not then how simple is it to create a user defined function to do this? Any help would be much appreciated. Thanks, Bhupinder Rayat |
Displaying the filename in a cell
Paul,
That works like a charm! Can I ask, wat are all the cell refs to A1 for? If I enter any value in cell A1 it doesn't effect the formula, which is great, but I was just wondering wat they are for? Thanks a bunch! Bhupinder Rayat "Paul B" wrote: Bhupinder, try this in a cell, workbook has to be saved first =MID(LEFT(CELL("filename",A1), FIND("]", CELL("filename",A1))-1),FIND("[", CELL("filename",A1))+1, 255) -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "Bhupinder Rayat" wrote in message ... Is there any way of displaying the filename of the spreadsheet in a cell within the workbook? If not then how simple is it to create a user defined function to do this? Any help would be much appreciated. Thanks, Bhupinder Rayat |
Displaying the filename in a cell
Take a look at
http://www.xldynamic.com/source/xld.xlFAQ0002.html Excel FAQs - File Path, File and Worksheet Names -- HTH RP (remove nothere from the email address if mailing direct) "Bhupinder Rayat" wrote in message ... Is there any way of displaying the filename of the spreadsheet in a cell within the workbook? If not then how simple is it to create a user defined function to do this? Any help would be much appreciated. Thanks, Bhupinder Rayat |
Displaying the filename in a cell
See my response.
-- HTH RP (remove nothere from the email address if mailing direct) "Bhupinder Rayat" wrote in message ... Paul, That works like a charm! Can I ask, wat are all the cell refs to A1 for? If I enter any value in cell A1 it doesn't effect the formula, which is great, but I was just wondering wat they are for? Thanks a bunch! Bhupinder Rayat "Paul B" wrote: Bhupinder, try this in a cell, workbook has to be saved first =MID(LEFT(CELL("filename",A1), FIND("]", CELL("filename",A1))-1),FIND("[", CELL("filename",A1))+1, 255) -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "Bhupinder Rayat" wrote in message ... Is there any way of displaying the filename of the spreadsheet in a cell within the workbook? If not then how simple is it to create a user defined function to do this? Any help would be much appreciated. Thanks, Bhupinder Rayat |
All times are GMT +1. The time now is 08:12 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com