Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Take a Cell and add it to the Footer or Tab
I am trying to be able to take a cell that contains someone's name and either
have it automatically placed in the Footer of the document or have it be used to name that Tab (for ease of finding which spreadsheet belongs to each employee). Can either of these be done? I've tried to customize the footer to include the cell ID that houses the employee's name, but it doesn't work. Thanks. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Take a Cell and add it to the Footer or Tab
This little macro will rename all the tabs to the value of the text in cell
A1 of that tab: Sub Macro1() Dim s As Worksheet For Each s In Worksheets s.Name = s.Range("A1").Value Next End Sub just be sure that each name in A1 is unique and is a valid tab name. -- Gary''s Student "Frank Costa" wrote: I am trying to be able to take a cell that contains someone's name and either have it automatically placed in the Footer of the document or have it be used to name that Tab (for ease of finding which spreadsheet belongs to each employee). Can either of these be done? I've tried to customize the footer to include the cell ID that houses the employee's name, but it doesn't work. Thanks. |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Take a Cell and add it to the Footer or Tab
Frank Costa wrote:
I am trying to be able to take a cell that contains someone's name and either have it automatically placed in the Footer of the document or have it be used to name that Tab (for ease of finding which spreadsheet belongs to each employee). Can either of these be done? I've tried to customize the footer to include the cell ID that houses the employee's name, but it doesn't work. This will customize the (center) footer: Sub DefineFooter() Dim sht As Worksheet For Each sht In Worksheets sht.PageSetup.CenterFooter = sht.Range("A1").Value Next End Sub -- /Sune |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Take a Cell and add it to the Footer or Tab
Now I feel dumb. Where do I place that macro and how?
"Gary''s Student" wrote: This little macro will rename all the tabs to the value of the text in cell A1 of that tab: Sub Macro1() Dim s As Worksheet For Each s In Worksheets s.Name = s.Range("A1").Value Next End Sub just be sure that each name in A1 is unique and is a valid tab name. -- Gary''s Student "Frank Costa" wrote: I am trying to be able to take a cell that contains someone's name and either have it automatically placed in the Footer of the document or have it be used to name that Tab (for ease of finding which spreadsheet belongs to each employee). Can either of these be done? I've tried to customize the footer to include the cell ID that houses the employee's name, but it doesn't work. Thanks. |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Take a Cell and add it to the Footer or Tab
You will need a macro.
Sub CellInFooter() With ActiveSheet .PageSetup.CenterFooter = .Range("A1").text End With End Sub OR stick it in a BeforePrint sub. Private Sub Workbook_BeforePrint(Cancel As Boolean) With ActiveSheet .PageSetup.CenterFooter = .Range("A1").Text End With End Sub Gord Dibben MS Excel MVP On Thu, 26 Oct 2006 12:31:02 -0700, Frank Costa <Frank wrote: I am trying to be able to take a cell that contains someone's name and either have it automatically placed in the Footer of the document or have it be used to name that Tab (for ease of finding which spreadsheet belongs to each employee). Can either of these be done? I've tried to customize the footer to include the cell ID that houses the employee's name, but it doesn't work. Thanks. |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Take a Cell and add it to the Footer or Tab
See:
http://www.mvps.org/dmcritchie/excel/getstarted.htm -- Gary's Student "Frank Costa" wrote: Now I feel dumb. Where do I place that macro and how? "Gary''s Student" wrote: This little macro will rename all the tabs to the value of the text in cell A1 of that tab: Sub Macro1() Dim s As Worksheet For Each s In Worksheets s.Name = s.Range("A1").Value Next End Sub just be sure that each name in A1 is unique and is a valid tab name. -- Gary''s Student "Frank Costa" wrote: I am trying to be able to take a cell that contains someone's name and either have it automatically placed in the Footer of the document or have it be used to name that Tab (for ease of finding which spreadsheet belongs to each employee). Can either of these be done? I've tried to customize the footer to include the cell ID that houses the employee's name, but it doesn't work. Thanks. |
#7
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Take a Cell and add it to the Footer or Tab
To All Who Helped Me.
Thanks! I appreciate it. Frank "Gary''s Student" wrote: See: http://www.mvps.org/dmcritchie/excel/getstarted.htm -- Gary's Student "Frank Costa" wrote: Now I feel dumb. Where do I place that macro and how? "Gary''s Student" wrote: This little macro will rename all the tabs to the value of the text in cell A1 of that tab: Sub Macro1() Dim s As Worksheet For Each s In Worksheets s.Name = s.Range("A1").Value Next End Sub just be sure that each name in A1 is unique and is a valid tab name. -- Gary''s Student "Frank Costa" wrote: I am trying to be able to take a cell that contains someone's name and either have it automatically placed in the Footer of the document or have it be used to name that Tab (for ease of finding which spreadsheet belongs to each employee). Can either of these be done? I've tried to customize the footer to include the cell ID that houses the employee's name, but it doesn't work. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|