file name and workshet name function?

Dear group:
    I have Soooo many worksheets (since 1985 with many software types!) that 
I have a hard time recalling where a past work sheet is in my hard drive 
these days.

    Like Date and Time, I wish that I could apply a function that would list 
the workbook file name as a direct display in a cell on any given work 
sheet. I have often done this as the Header so that when I print it, that 
information appears without fault. I put the date and the time on the upper 
left, and the worksheet name & the workbook filename on the upper right, in 
small pint type. That way, when I revisit old hard copy reports, I know 
where I can revisit those worksheet for updates and copy, etc.

    But now that it is feasible to copy spreadsheet images (cells only) and 
insert that image directly into reports. That header information is not 
present.

    So I need a special function that will fetch and display the worksheet 
name and the workbook filename within any cell, i.e. into a cell just like 
Time and Date now can do now.

    I have tried to use the Excel "Function" search without success. I've 
thought of building my own function for this matter, but I come up dry... I 
have never seen any word processor or spreadsheet software that can do that, 
other than the header method (which is not in an imaged cell).

    So, I ask: What function will fetch the worksheet title and the .xls 
filename into a cell in Excel?

            Angelo Campanella



--- news://freenews.netfront.net/ - complaints: news@netfront.net ---
0
Angelo
2/19/2010 1:42:31 AM
excel 39879 articles. 2 followers. Follow

3 Replies
709 Views

Similar Articles

[PageSpeed] 35

This formula will return the sheet name:

=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)

This formula will return the file name including the file extension:

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

Note: DO NOT change anything in either formula! They can be entered in any 
cell but enter them *exactly* as shown. Also, the file must have been saved 
at least once.

-- 
Biff
Microsoft Excel MVP


"Angelo Campanella" <a.campanella@att.net> wrote in message 
news:hlkqa6$1v17$1@adenine.netfront.net...
> Dear group:
>    I have Soooo many worksheets (since 1985 with many software types!) 
> that I have a hard time recalling where a past work sheet is in my hard 
> drive these days.
>
>    Like Date and Time, I wish that I could apply a function that would 
> list the workbook file name as a direct display in a cell on any given 
> work sheet. I have often done this as the Header so that when I print it, 
> that information appears without fault. I put the date and the time on the 
> upper left, and the worksheet name & the workbook filename on the upper 
> right, in small pint type. That way, when I revisit old hard copy reports, 
> I know where I can revisit those worksheet for updates and copy, etc.
>
>    But now that it is feasible to copy spreadsheet images (cells only) and 
> insert that image directly into reports. That header information is not 
> present.
>
>    So I need a special function that will fetch and display the worksheet 
> name and the workbook filename within any cell, i.e. into a cell just like 
> Time and Date now can do now.
>
>    I have tried to use the Excel "Function" search without success. I've 
> thought of building my own function for this matter, but I come up dry... 
> I have never seen any word processor or spreadsheet software that can do 
> that, other than the header method (which is not in an imaged cell).
>
>    So, I ask: What function will fetch the worksheet title and the .xls 
> filename into a cell in Excel?
>
>            Angelo Campanella
>
>
>
> --- news://freenews.netfront.net/ - complaints: news@netfront.net --- 


0
T
2/19/2010 3:50:39 AM
    WOW! Who'd a' thunk it?! I'd NEVER figure that one out.

    It belongs in the Excel Help Archives NOW. It's already in two of my 
spreadsheets!

        Sincerely,

            Angelo Campanella

=========================================
references:
"T. Valko" <biffinpitt@comcast.net> wrote in message 
news:%23AKA0aRsKHA.4752@TK2MSFTNGP04.phx.gbl...
> This formula will return the sheet name:
>
> =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
>
> This formula will return the file name including the file extension:
>
> =MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND("]",CELL("filename",A1))-FIND("[",CELL("filename",A1))-1)
>
> Note: DO NOT change anything in either formula! They can be entered in any 
> cell but enter them *exactly* as shown. Also, the file must have been 
> saved at least once.
>
> -- 
> Biff
> Microsoft Excel MVP
>
>
> "Angelo Campanella" <a.campanella@att.net> wrote in message 
> news:hlkqa6$1v17$1@adenine.netfront.net...
>> Dear group:
>>    I have Soooo many worksheets (since 1985 with many software types!) 
>> that I have a hard time recalling where a past work sheet is in my hard 
>> drive these days.
>>
>>    Like Date and Time, I wish that I could apply a function that would 
>> list the workbook file name as a direct display in a cell on any given 
>> work sheet. I have often done this as the Header so that when I print it, 
>> that information appears without fault. I put the date and the time on 
>> the upper left, and the worksheet name & the workbook filename on the 
>> upper right, in small pint type. That way, when I revisit old hard copy 
>> reports, I know where I can revisit those worksheet for updates and copy, 
>> etc.
>>
>>    But now that it is feasible to copy spreadsheet images (cells only) 
>> and insert that image directly into reports. That header information is 
>> not present.
>>
>>    So I need a special function that will fetch and display the worksheet 
>> name and the workbook filename within any cell, i.e. into a cell just 
>> like Time and Date now can do now.
>>
>>    I have tried to use the Excel "Function" search without success. I've 
>> thought of building my own function for this matter, but I come up dry... 
>> I have never seen any word processor or spreadsheet software that can do 
>> that, other than the header method (which is not in an imaged cell).
>>
>>    So, I ask: What function will fetch the worksheet title and the .xls 
>> filename into a cell in Excel?
>>
>>            Angelo Campanella
>>
>>
>>
>> --- news://freenews.netfront.net/ - complaints: news@netfront.net --- 
>
> 



--- news://freenews.netfront.net/ - complaints: news@netfront.net ---
0
Angelo
2/19/2010 5:27:23 AM
Sounds like you're a happy camper!

Thanks for the feedback.

-- 
Biff
Microsoft Excel MVP


"Angelo Campanella" <a.campanella@att.net> wrote in message 
news:hll7fr$2kbb$1@adenine.netfront.net...
>    WOW! Who'd a' thunk it?! I'd NEVER figure that one out.
>
>    It belongs in the Excel Help Archives NOW. It's already in two of my 
> spreadsheets!
>
>        Sincerely,
>
>            Angelo Campanella
>
> =========================================
> references:
> "T. Valko" <biffinpitt@comcast.net> wrote in message 
> news:%23AKA0aRsKHA.4752@TK2MSFTNGP04.phx.gbl...
>> This formula will return the sheet name:
>>
>> =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
>>
>> This formula will return the file name including the file extension:
>>
>> =MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND("]",CELL("filename",A1))-FIND("[",CELL("filename",A1))-1)
>>
>> Note: DO NOT change anything in either formula! They can be entered in 
>> any cell but enter them *exactly* as shown. Also, the file must have been 
>> saved at least once.
>>
>> -- 
>> Biff
>> Microsoft Excel MVP
>>
>>
>> "Angelo Campanella" <a.campanella@att.net> wrote in message 
>> news:hlkqa6$1v17$1@adenine.netfront.net...
>>> Dear group:
>>>    I have Soooo many worksheets (since 1985 with many software types!) 
>>> that I have a hard time recalling where a past work sheet is in my hard 
>>> drive these days.
>>>
>>>    Like Date and Time, I wish that I could apply a function that would 
>>> list the workbook file name as a direct display in a cell on any given 
>>> work sheet. I have often done this as the Header so that when I print 
>>> it, that information appears without fault. I put the date and the time 
>>> on the upper left, and the worksheet name & the workbook filename on the 
>>> upper right, in small pint type. That way, when I revisit old hard copy 
>>> reports, I know where I can revisit those worksheet for updates and 
>>> copy, etc.
>>>
>>>    But now that it is feasible to copy spreadsheet images (cells only) 
>>> and insert that image directly into reports. That header information is 
>>> not present.
>>>
>>>    So I need a special function that will fetch and display the 
>>> worksheet name and the workbook filename within any cell, i.e. into a 
>>> cell just like Time and Date now can do now.
>>>
>>>    I have tried to use the Excel "Function" search without success. I've 
>>> thought of building my own function for this matter, but I come up 
>>> dry... I have never seen any word processor or spreadsheet software that 
>>> can do that, other than the header method (which is not in an imaged 
>>> cell).
>>>
>>>    So, I ask: What function will fetch the worksheet title and the .xls 
>>> filename into a cell in Excel?
>>>
>>>            Angelo Campanella
>>>
>>>
>>>
>>> --- news://freenews.netfront.net/ - complaints: news@netfront.net --- 
>>
>>
>
>
>
> --- news://freenews.netfront.net/ - complaints: news@netfront.net --- 


0
T
2/19/2010 7:09:23 PM
Reply:

Similar Artilces:

How do I automatically prompt to file a sent message?
As a former NOTES user, I've become accustomed to being able to both send and file an email in "one" step. In Outlook the default is to file the sent item in the "sent" folder, or the folder in which the original message resides. I'd like the option of choosing any folder in which to file the sent message to come up automatically when I send an email. Any ideas? See http://www.outlookcode.com/d/code/setsavefolder.htm for sample VBA code to do this. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators,...

Extracting names from a database.
In column A I have twenty groups, in Column B ref#, In Column C First Name, In Column D Surname and In Column E the numerical value. The data rows are from 2 to 534. I can find the total and maximum for each group using arrays. 1. What I like is the name of who has the highest value in each group. 2. If they are tied then all the names that are tied maximum. 3. If possible all the names in the group with a value over 2. I hope that this makes sense. Hi try: 1. =INDEX(D2:D534,MATCH(MAX(E2:E534),E2:E534,0)) 2. Try the following array formula: =INDEX($D$2:$D$534,SMALL(IF($E$2:$E$534=MA...

saving publisher file to PDF file format #2
after creating a page in publisher i need to save it as a pdf file and send by email to a publishing house "Eddie" <Eddie@discussions.microsoft.com> wrote in message news:87A433B3-6EA5-439E-806D-74C985EA24DC@microsoft.com... > after creating a page in publisher i need to save it as a pdf file and > send > by email to a publishing house If you don't have Adobe Acrobat (not the Reader), download either of these: http://www.win2pdf.com or http://www.primopdf.com ...

Inserting a file from FTP
Hello i have a FTP server that host's files for my office to share. >From one computer that has publisher 2000 on it has problems inserting a file from the ftp into a publisher document. The error i recive from that computer is that it has a problem linking a file that is not on the computer or on the network. The odd thing is that every other computer in the building can connect to the FTP and insert images from it. Also the computer can connect to the FTP through Internet Exlplorer so connectivity isn't a problem. Any help on this would be great. Also most the other computer'...

Outlook 2003: Copy Full Names to email display Names
I recently upgraded to Outlook 2003 from 2000. I believe 2000 used to choose email addresses based on the Full Name field. 2003 appears to choose based on the Email Display name. Most of my email Display Names are just the email addresses. What is the easiest way to copy the Full Name to the email Display Name? What do you mean by "choose email addresses?" The Display Name has varied with each version of Outlook, but it is of no consequence. What makes you think it is? -- Russ Valentine [MVP-Outlook] "orbojeff" <jeff.callahan@orbograph.com> wrote in message new...

Migrating Office X files to Windows SBS 2k3
I have a situation with migrating some older Office X files to a new Windows Small-Biz Server 2003 environment. It seems that the person I am working with did not use the "Append file extensions" option when saving his Office X files on his Mac server (10.2.8). So now I have a situation where I need to move these extension-less files over to the Windows server but they will lose thier file associations. Is there anyway to save this extension "metadata" to convert these files on the Windows side? I have about 20GB of data to migrate and manually opening each file wi...

Duplicate File Message opening an Excel 97 file from Windows Expl.
When I open an Excel 97 file from Windows Explorer or the Documents menu of the Start button, the document opens, and I get a message that "A document with the name "XXXXX" is already open. You cannot open two documents with the same name, evan if the documents are in different folders." If I start Excel, firs, I don't get this message. Hi see: http://www.contextures.com/xlfaqApp.html#AlreadyOpen -- Regards Frank Kabel Frankfurt, Germany Mark B wrote: > When I open an Excel 97 file from Windows Explorer or the Documents > menu of the Start button, the ...

Excel File Association not working
Hi, One of our users cannot open an Excel file by just double-clicking on it any longer. If he opens Excel first, he can browse to the file and open it. I looked at the file associations for .xls types of files and it lists Excel as the program to use to open .xls. I tried an Office repair, but that didn't help. Can anyone tell me how to fix this? Thanks, Sandy M Sometimes one of these works for similar problems. Tools|Options|General|Ignore other applications (uncheck it) --- or --- Close Excel and Windows Start Button|Run excel /unregserver then W...

How to save a PC Excel file into MAC (it says file is read only)?
I am having troubles with an Excel workbook I created on my PC (using Excel 2000). Essentially I can't save it in a Machintosh computer. Thanks for your help ...

How to convert binary file to ASCII file
How to convert binary file to ASCII file? Thanks in advance! "prinz" <de6666@lycos.com> wrote in message news:40222AF5.B3B6EFFB@lycos.com... > How to convert binary file to ASCII file? > > Thanks in advance! > well, an ascii file is a binary file... just the bits happen to be easily displayable as letters, number, and other symbols. you will have to find out what the meaning of each bit in the binary file is, how the bits are grouped into bytes, and how the bytes are grouped into higher order things. then read the file with the appropriate file access method a...

Trying to Open Excel File, But its says file is locked for editing
I'm trying to open an Excel file on a network drive. However when I try to open it. It has an Error Message: File in use. Drivers return 'Taco far return disk Chart 2005.xls' is locked for editing. Options are 'Read Only', 'Notify' or 'Cancel' I know no one is in the spreadsheet, and does not indicate who would be if there was. Can anyone help? Maybe: http://contextures.com/xlfaqApp.html#ReadOnly or http://contextures.com/xlfaqApp.html#AlreadyOpen Both from Debra Dalgleish's site. Smeeta Geary wrote: > > I'm trying to open an Exc...

problems with inserting html to xslt file.
Hi, I have a string/xml value that has to be inserted to a specific <xsl:tempalte> tag, I have a namespace registered so that I can insert new XSL elements. nsmgr = New XmlNamespaceManager(myXslt.NameTable) nsmgr.AddNamespace("xsl", "http://www.w3.org/1999/XSL/Transform") This is the string that has to be inserted to xsl:template tag : <tr> <td><xsl:apply-templates select="bla" /></td> </tr> If I try the element.insertXml method there is an error saying undeclared namespace and poiting to the <xsl:apply> tag. The...

Those damn pst files!!
Hello, I have had MANY problems with outlook, first, I had problems where I had to reinstall every time I closed outlook xp or I couldn't send emails, then I tried the detect and repair--restore defaults, then I reconfigured and it seemed to work fine...EXCEPT I could no longer intellisync or sync anything...I looked into the matter, and found that my default Outlook.pst was now outlook1.pst, so I changed the name to outlook.pst, reconfigured (again lost the address book in the process) and still can't sync...what is up with these damn pst files? WHERE should I put that OUTL...

%20 shows up in document name when doing a save as
I do alot of quotes that I pull up an old document, update with new info, then save as a new document name, leaving the old one as is. Sometimes when I go to save the new document as save as, the spaces in the name of the document are filled with the percentage symbol and 20, %20. Does anyone know how to fix this? ...

Storing strings in header file via resource file (.rc file) ?
Hi: My application needs to support multiple languages. I'm now planning to strong strings in multiple string tables in the rc file; where each string table contains one language. My question is: will it be much simpler to store those strings in multiple header files? In this case a string can be used directly without the need to use CString to load each string before using it. Please let me know if I'm missing some advantages using the rc file to store strings. Thanks in Advance. Polaris "Polaris" <etpolaris@hotmail.com> wrote in message news:<e...

Can i import one excel file to another excel file?
I have a new excel file that I want to update with an older excel file, can I import the two? There must be an easy way to merge the two together without having to retype. Depends on what you mean by update. If it's just to add more data to the bottom of an existing list, open both files, then select the data, Edit/Copy it and Edit/Paste to the other workbook. If that's not what you want, can you be more specific? On Thu, 14 Oct 2004 20:59:09 -0700, "kimbers867" <kimbers867@discussions.microsoft.com> wrote: >I have a new excel file that I want to update with ...

Problem converting Quicken backup file to Money 2004
Hi, When I use the Converting Quickent Files feature, after the conversion is done, it shows the correct balance in the Quicken balance, but on the Money balance column, it's all zero. After conversion, I open the converted Money file, all accounts still show zero balance. What's the correct way to import all Quicken accounts and balance to Money? thp ...

OL 2002 - Attached MSG file - No body property returned
We have a large number of psts with emails bearing problematic MSG attachments. The PST files appear to be from an Exchange environment (Likely 2000). We are using VB6 to access the data via Outlook 2002 (we've tried 2003, but with the same results). Outlook 2002 (sp-2) is not returning any value for the body property of an attached MSG email items. When opening them in Outlook, you can see that there is in fact body text which seems only to be visible when viewed through the UI in OL. Here is something odd: 1. When viewed in Quick View Plus (ver 6 & 8) it appears with only the heade...

opening .wks files
Had created spreadsheets as .wks files on Windows ME. I'm unable to open these now that I've upgraded to XP and Office XP. I've tried to associate them with Excel but they will not open properly. How can I retreive these? Hi a repost from Ken Wright to convert MS Works files: ----- Generally you would normally open the file in WORKS and then save it down as a file that Excel can read. .xlr is a native Excel format, or .txt, ..csv, dbaseIV are all formats it can read. You can also find a converter here if you don't have WORKS. http://www.rl-software.com/indexjs.htm?/con...

Converting a file Money 2001 --> Money 2005 Help!!
Hi, I've downloaded the trial for Money 2005 Deluxe. I was previously using Money 2001 (standard). I get an error --------------------------- Microsoft Money --------------------------- Money cannot open this file because it was created by an incompatible version. --------------------------- OK --------------------------- I've tried renaming the file and opening as someone suggested on the group somewhere which I couldn't get to work. So I downloaded the 2004 trial and converted it to 2004 which worked ok. I then tried to upgrade my new 2004 file to 2005 which failed again....

i need to write an IF function formula, how?
i need to write an IF function that displays "made" if the average in H5 is less than 76 and "cut" if the score is not less than 76. help?!! =if(h5<76,"made","cut") maxwell wrote: > > i need to write an IF function that displays "made" if the average in H5 is > less than 76 and "cut" if the score is not less than 76. help?!! -- Dave Peterson ...

Internal zip/unzip function? Also archives?
Apologies if this has been discussed before. I'd have searched the list archives if I knew where to look (?) Are there internal functions to zip and unzip external files? Right now I'm creating command line procedures and shelling out to them, which is kind of crummy. Dick WinZip has a command line application that can be used with the Shell command. -- HTH Scott<> Microsoft Access MVP 2007 news2@rgcle.com wrote: > Apologies if this has been discussed before. I'd have searched the list > archives if I knew where to look (?) > > Are there internal functio...

File in Use
I am using Excel 2002 XP - SP2 When I go to open up the workbook 'money' I get the following message pop up: File in Use money.xls is locked for editing by Bill Chatfield there are 3 buttons on the right of the message box read only notify cancel I have no idea why it started doing this a few days ago. I have been using this workbook for years. I check the properties and it is not 'read only' or 'hidden' and once I re-boot it will open fine and then for no apparent reason I get the above message again. The only thing I can think of that MIGHT be related to this ...

Logical Name of Epson printer
Epson provides an Epson ADK for .NET using which we can provide a logical name to the Epson printers. I am printing to the Epson printers using OPOS divers and I have to install the Epson ADK for .NET just so that I can give the printer a logical name. This needs to be done on the client machine as well. The problem is that this ADK is not really meant to be redistributed and moreoever, it is a large installation which further requires that Microsoft Point Of Service be present on the system. This means installing 2 softwares just so that we can give the printer a logical name. Is there any ot...

Excel file saves as a temp file with numeric file name
I have a bug with an excel worksheet. When i save the file it saves it not as my filename, but as a temp file with a name like D7d98300 and the file icon is of the MS DOS variety. When i click on the file it opens up in excel. However when i save it again it saves as a temp file with a different numerical file name. Could someone please explain what the bug is? Thanks in anticipation. Michael --- Message posted from http://www.ExcelForum.com/ When you save a file, excel will save it as a temporary file (8 characters, no extension). Then if that save is successful, excel will delete the...