Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Linking cell A in sheet 1 with several cells in sheet 2 | Excel Worksheet Functions | |||
Button linking to another cell and sheet | Links and Linking in Excel | |||
Linking a dinamic cell value from one sheet to another | Excel Discussion (Misc queries) | |||
linking of outside charts to each cell in the sheet | Charts and Charting in Excel | |||
Sheet Names and Cell References | Excel Worksheet Functions |