Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Rowf
 
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   Report Post  
Fredrik Wahlgren
 
Posts: n/a
Default


"Rowf" wrote in message
...
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   Report Post  
Gord Dibben
 
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??


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
Shared Excel File keeps growing........ [email protected] Excel Discussion (Misc queries) 1 March 2nd 05 08:24 PM
import .CSV file to XP EXcel 2003 worksheet, the seperator is com. ML New Users to Excel 1 January 22nd 05 05:23 PM
Excel 2000 file when opened in Excel 2003 generates errors? Doug Excel Discussion (Misc queries) 13 December 25th 04 10:20 PM
Problem opening an XML file in Excel - getting "ns1:macrosPresent" rprondeau Excel Discussion (Misc queries) 0 December 15th 04 03:39 PM


All times are GMT +1. The time now is 11:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"