Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
tom tom is offline
external usenet poster
 
Posts: 570
Default Sheet names linking to cell

Hopefully an easy one, but I can't seem to do it.

How can I name my sheets with in a workbook to pick up a cell, i.e sheet 1
is call the same as cell A1.

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default Sheet names linking to cell

See

http://www.mcgimpsey.com/excel/event...efromcell.html


In article ,
Tom wrote:

Hopefully an easy one, but I can't seem to do it.

How can I name my sheets with in a workbook to pick up a cell, i.e sheet 1
is call the same as cell A1.

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Sheet names linking to cell

This macro will go thru each worksheet and set its name equal to the value in
cell A1 in that sheet:

Sub namesheet()
For Each ws In Worksheets
ws.Activate
ActiveSheet.Name = Range("A1").Value
Next
End Sub

just make sure the names are both valid & unique
--
Gary''s Student - gsnu200747


"Tom" wrote:

Hopefully an easy one, but I can't seem to do it.

How can I name my sheets with in a workbook to pick up a cell, i.e sheet 1
is call the same as cell A1.

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 638
Default Sheet names linking to cell

JE provided you with the same procedure I would recommend. You may
also want want to incorporate a cleaner to get rid of any invalid
characters in A1. Something like:
Function cleanName(ByVal txtString As String)
invalidChrArray = Array(":", "/", "*", "\", "?")
For y = LBound(invalidChrArray) To UBound(invalidChrArray)
txtString = Replace(txtString, invalidChrArray(y), "", 1)
Next y
cleanName = txtString
End Function

Then you can clean Range A1 like cleanName(Range("A1").Text)
Tom wrote:
Hopefully an easy one, but I can't seem to do it.

How can I name my sheets with in a workbook to pick up a cell, i.e sheet 1
is call the same as cell A1.

Thanks


  #5   Report Post  
Posted to microsoft.public.excel.misc
tom tom is offline
external usenet poster
 
Posts: 570
Default Sheet names linking to cell

Thanks for your help everybody, all very useful and I got it working.

"JW" wrote:

JE provided you with the same procedure I would recommend. You may
also want want to incorporate a cleaner to get rid of any invalid
characters in A1. Something like:
Function cleanName(ByVal txtString As String)
invalidChrArray = Array(":", "/", "*", "\", "?")
For y = LBound(invalidChrArray) To UBound(invalidChrArray)
txtString = Replace(txtString, invalidChrArray(y), "", 1)
Next y
cleanName = txtString
End Function

Then you can clean Range A1 like cleanName(Range("A1").Text)
Tom wrote:
Hopefully an easy one, but I can't seem to do it.

How can I name my sheets with in a workbook to pick up a cell, i.e sheet 1
is call the same as cell A1.

Thanks



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
Linking cell A in sheet 1 with several cells in sheet 2 o0KelviN0o Excel Worksheet Functions 1 March 28th 07 03:01 AM
Button linking to another cell and sheet SouthernBoy718 Links and Linking in Excel 0 January 7th 07 01:15 AM
Linking a dinamic cell value from one sheet to another KT Excel Discussion (Misc queries) 1 July 17th 05 12:53 AM
linking of outside charts to each cell in the sheet steve Charts and Charting in Excel 1 May 6th 05 08:58 AM
Sheet Names and Cell References Reed Excel Worksheet Functions 1 January 19th 05 11:17 PM


All times are GMT +1. The time now is 02:58 AM.

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

About Us

"It's about Microsoft Excel"