A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Display Worksheet in Excel File



 
 
Thread Tools Display Modes
  #1  
Old March 30th, 2005, 07:17 PM
Rowf
external usenet poster
 
Posts: n/a
Default Display Worksheet in Excel File

I want to Display the worksheet name on the Excel Spreadsheet itself.

ie. On Worksheet1, Cell A1 = Worksheet1

How do I do this without having C:\Desktop\Book1.xls\Worksheet1??
  #2  
Old March 30th, 2005, 08:07 PM
Fredrik Wahlgren
external usenet poster
 
Posts: n/a
Default


"Rowf" wrote in message
news
I want to Display the worksheet name on the Excel Spreadsheet itself.

ie. On Worksheet1, Cell A1 = Worksheet1

How do I do this without having C:\Desktop\Book1.xls\Worksheet1??


You have to make a User Defined Function. Start the Visual Basic Editor,
insert a new module and enter

Public Function wks() As String
wks = Application.Caller.Parent.Name
End Function

Now, if you enter =wks() in a cell in any worksheet, wks will return the
name of that worksheet.

/Fredrik


  #3  
Old March 30th, 2005, 10:16 PM
Gord Dibben
external usenet poster
 
Posts: n/a
Default

Rowf

Enter in any cell on a sheet.

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

File must have been saved at least once.


Gord Dibben Excel MVP

On Wed, 30 Mar 2005 10:17:03 -0800, "Rowf"
wrote:

I want to Display the worksheet name on the Excel Spreadsheet itself.

ie. On Worksheet1, Cell A1 = Worksheet1

How do I do this without having C:\Desktop\Book1.xls\Worksheet1??


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Importing Contacts from Work to Home Computer in Outlook Debbie Contacts 3 March 16th, 2005 09:14 PM
Windows in Taskbar Chevy General Discussion 8 October 15th, 2004 03:57 PM
Output Access query to named worksheet in Excel file Stuart General Discussion 3 September 9th, 2004 09:49 AM
excel butchering a CSV file Chris Strug General Discussion 2 September 8th, 2004 11:26 AM
Unsafe Attachments Ron Installation & Setup 2 June 9th, 2004 01:55 AM


All times are GMT +1. The time now is 04:22 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.