#1   Report Post  
Sheila
 
Posts: n/a
Default Sheet Name

Is there any way I can name a sheet from a worksheet cell??

TIA

Sheila
  #2   Report Post  
William
 
Posts: n/a
Default

Hi Sheila

Sub test()
Sheets("Sheet1").Name = Sheets("Sheet1").Range("A1")
End Sub

--

XL2003
Regards

William



"Sheila" (remove underscores) wrote in message
...
Is there any way I can name a sheet from a worksheet cell??

TIA

Sheila



  #3   Report Post  
Sheila
 
Posts: n/a
Default

Thanks so much for that, I appreciate it.

Sheila



On Mon, 16 May 2005 04:25:47 +0100, "William"
wrote:

Hi Sheila

Sub test()
Sheets("Sheet1").Name = Sheets("Sheet1").Range("A1")
End Sub


  #4   Report Post  
Sheila
 
Posts: n/a
Default

Ummm, ok, but where do I put this? I answered thanks before I ead
this properly.

Thanks

Sheila




On Mon, 16 May 2005 04:25:47 +0100, "William"
wrote:

Hi Sheila

Sub test()
Sheets("Sheet1").Name = Sheets("Sheet1").Range("A1")
End Sub


  #5   Report Post  
Max
 
Posts: n/a
Default

Perhaps you'd also like to try this recent post by Jason Morin ..
---------
Assuming your target cell for the sheet name is B1, right-click on the
worksheet tab, select View Code, and paste in the following:

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Me.[B1], Target) Is Nothing Then
On Error GoTo InvalidName
Me.Name = Target.Value
Exit Sub
End If
InvalidName:
MsgBox "Invalid sheet name."
End Sub

---
Press ALT+Q to close the VBE.
---
Back in Excel, test it out by inputting the desired sheetname, say: Sheila
into cell B1. When you press ENTER, the sheetname will change to: Sheila

Here's a sample file with the implemented code :
http://flypicture.com/p.cfm?id=48813
(Right-click on the link: "Download File" at the top in the page, just above
the ads)
File: Sheila_wksht.xls

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----




  #6   Report Post  
Sheila
 
Posts: n/a
Default

PERFECT Max, thank you so much.

Sheila


On Mon, 16 May 2005 15:50:53 +0800, "Max"
wrote:

Perhaps you'd also like to try this recent post by Jason Morin ..
---------
Assuming your target cell for the sheet name is B1, right-click on the
worksheet tab, select View Code, and paste in the following:

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Me.[B1], Target) Is Nothing Then
On Error GoTo InvalidName
Me.Name = Target.Value
Exit Sub
End If
InvalidName:
MsgBox "Invalid sheet name."
End Sub

---
Press ALT+Q to close the VBE.
---
Back in Excel, test it out by inputting the desired sheetname, say: Sheila
into cell B1. When you press ENTER, the sheetname will change to: Sheila

Here's a sample file with the implemented code :
http://flypicture.com/p.cfm?id=48813
(Right-click on the link: "Download File" at the top in the page, just above
the ads)
File: Sheila_wksht.xls


  #7   Report Post  
Max
 
Posts: n/a
Default

You're welcome, Sheila !
Thanks for the feedback ..
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Sheila" (remove underscores) wrote in message
...
PERFECT Max, thank you so much.

Sheila



  #8   Report Post  
Arvi Laanemets
 
Posts: n/a
Default

Hi

=MID(CELL("filename";A1);FIND("]";CELL("filename";A1))+1;35)

The workbook must be saved, i.e. the formula doesn't work in freschly
created worlbook, until it is saved.
To refer to another sheet, replace A1 in formula with SheetName!A1.

--
When sending mail, use address arvil<attarkon.ee
Arvi Laanemets


"Sheila" (remove underscores) wrote in message
...
Is there any way I can name a sheet from a worksheet cell??

TIA

Sheila



  #9   Report Post  
Sheila
 
Posts: n/a
Default

Ummm, and where do i put this?

(i know, pain in the neck to be blonde)

Sheila



On Mon, 16 May 2005 08:19:45 +0300, "Arvi Laanemets"
wrote:

Hi

=MID(CELL("filename";A1);FIND("]";CELL("filename";A1))+1;35)

The workbook must be saved, i.e. the formula doesn't work in freschly
created worlbook, until it is saved.
To refer to another sheet, replace A1 in formula with SheetName!A1.


  #10   Report Post  
Arvi Laanemets
 
Posts: n/a
Default

Hi

Into cell where you want the sheet name to be displayed.

P.S. probably you have to replace semicolons in formula with commas!

--
When sending mail, use address arvil<attarkon.ee
Arvi Laanemets



"Sheila" (remove underscores) wrote in message
...
Ummm, and where do i put this?

(i know, pain in the neck to be blonde)

Sheila



On Mon, 16 May 2005 08:19:45 +0300, "Arvi Laanemets"
wrote:

Hi

=MID(CELL("filename";A1);FIND("]";CELL("filename";A1))+1;35)

The workbook must be saved, i.e. the formula doesn't work in freschly
created worlbook, until it is saved.
To refer to another sheet, replace A1 in formula with SheetName!A1.






  #11   Report Post  
Max
 
Posts: n/a
Default

Think the OP wanted it the other way round, Arvi ! <g
i.e. name the sheet from an input into a certain cell ..
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----


  #12   Report Post  
Sheila
 
Posts: n/a
Default

Sorry, I must not have explained myself well. I want to be able to
name the worksheet from the contents of a particular cell on that
worksheet, not p-ut the worksheet name into a cell.

Sheila



On Mon, 16 May 2005 09:56:01 +0300, "Arvi Laanemets"
wrote:

Hi

Into cell where you want the sheet name to be displayed.

P.S. probably you have to replace semicolons in formula with commas!


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
Impoting data from Sheet 1 to Sheet 2 a-leano Excel Discussion (Misc queries) 1 April 20th 05 01:05 AM
relative sheet references ala sheet(-1)!B11 so I can copy a sheet. RonMc5 Excel Discussion (Misc queries) 9 February 3rd 05 12:51 AM
linking multiple sheets to a summary sheet greg g Excel Discussion (Misc queries) 1 December 16th 04 07:43 AM
Function to automatically insert a new sheet as a result of data entry? Mark Mulik Excel Worksheet Functions 2 November 28th 04 02:21 AM
Naming & renaming a sheet tab Cgbilliar Excel Worksheet Functions 1 November 7th 04 05:57 PM


All times are GMT +1. The time now is 06:52 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"