Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default 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
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



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

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"