Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 50
Default Tab name = what's in a cell

Is there a way to get a Tab name to reference what is in a specific cell?
--
Eric
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 449
Default Tab name = what's in a cell

Yes.

You'll need a macro for that. Changing a sheetname causes changes to all
local and remote formulas that depends on cells in this sheet.

So before you ask "which macro", let me ask which specific cell and how does
it change its value?

Best wishes Harald

"Eric D" wrote in message
...
Is there a way to get a Tab name to reference what is in a specific cell?
--
Eric


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 50
Default Tab name = what's in a cell

I have a template saved. Every month cell A5 = "For The Month Ending
February 2009" for february and this changes for each month. I just want
the a tab to change based on what was pasted in cell A5. Does that make
sense?
--
Eric


"Harald Staff" wrote:

Yes.

You'll need a macro for that. Changing a sheetname causes changes to all
local and remote formulas that depends on cells in this sheet.

So before you ask "which macro", let me ask which specific cell and how does
it change its value?

Best wishes Harald

"Eric D" wrote in message
...
Is there a way to get a Tab name to reference what is in a specific cell?
--
Eric



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 449
Default Tab name = what's in a cell

Absolutely. Rightclick sheet tab, "view code", paste this in:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A5")) Is Nothing Then Exit Sub
On Error Resume Next
Me.Name = Trim$(Replace(Me.Range("A5").Value, _
"For The Month Ending ", ""))
End Sub

HTH. Best wishes Harald

"Eric D" wrote in message
...
I have a template saved. Every month cell A5 = "For The Month Ending
February 2009" for february and this changes for each month. I just want
the a tab to change based on what was pasted in cell A5. Does that make
sense?
--
Eric


"Harald Staff" wrote:

Yes.

You'll need a macro for that. Changing a sheetname causes changes to all
local and remote formulas that depends on cells in this sheet.

So before you ask "which macro", let me ask which specific cell and how
does
it change its value?

Best wishes Harald

"Eric D" wrote in message
...
Is there a way to get a Tab name to reference what is in a specific
cell?
--
Eric




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 50
Default Tab name = what's in a cell

the cell i want to reference is on another tab will this formula still work?
--
Eric


"Harald Staff" wrote:

Absolutely. Rightclick sheet tab, "view code", paste this in:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A5")) Is Nothing Then Exit Sub
On Error Resume Next
Me.Name = Trim$(Replace(Me.Range("A5").Value, _
"For The Month Ending ", ""))
End Sub

HTH. Best wishes Harald

"Eric D" wrote in message
...
I have a template saved. Every month cell A5 = "For The Month Ending
February 2009" for february and this changes for each month. I just want
the a tab to change based on what was pasted in cell A5. Does that make
sense?
--
Eric


"Harald Staff" wrote:

Yes.

You'll need a macro for that. Changing a sheetname causes changes to all
local and remote formulas that depends on cells in this sheet.

So before you ask "which macro", let me ask which specific cell and how
does
it change its value?

Best wishes Harald

"Eric D" wrote in message
...
Is there a way to get a Tab name to reference what is in a specific
cell?
--
Eric






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Tab name = what's in a cell

Maybe...

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, me.Range("A5")) Is Nothing Then
Exit Sub
end if
On Error Resume Next
Sheet9999.Name = Trim$(Replace(Me.Range("A5").Value, _
"For The Month Ending ", ""))
On Error Goto 0
End Sub

This looks at A5 of the sheet that owns the code. And it changes the name of
the worksheet that has a code name of Sheet9999.

You can find the codename of the worksheet by opening the VBE (alt-f11).
Showing the project explorer (ctrl-r)
Expanding the workbooks project (like expanding a folder in windows explorer)

Under the Microsoft Objects section, you'll see something like:
Sheet1 (NameYouSeeOnTheWorkSheetTabInExcel)

The codename is the name to the left of the name in ()'s.

You'll have to change that in the code.

And this code goes in the worksheet module for the worksheet that contains the
cell getting changed.

Eric D wrote:

the cell i want to reference is on another tab will this formula still work?
--
Eric

"Harald Staff" wrote:

Absolutely. Rightclick sheet tab, "view code", paste this in:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A5")) Is Nothing Then Exit Sub
On Error Resume Next
Me.Name = Trim$(Replace(Me.Range("A5").Value, _
"For The Month Ending ", ""))
End Sub

HTH. Best wishes Harald

"Eric D" wrote in message
...
I have a template saved. Every month cell A5 = "For The Month Ending
February 2009" for february and this changes for each month. I just want
the a tab to change based on what was pasted in cell A5. Does that make
sense?
--
Eric


"Harald Staff" wrote:

Yes.

You'll need a macro for that. Changing a sheetname causes changes to all
local and remote formulas that depends on cells in this sheet.

So before you ask "which macro", let me ask which specific cell and how
does
it change its value?

Best wishes Harald

"Eric D" wrote in message
...
Is there a way to get a Tab name to reference what is in a specific
cell?
--
Eric





--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 50
Default Tab name = what's in a cell

hey dave, thanks for the suggestion, but i am very very visual basic
impared, i know nothing ... i don't see a module for the sheet that will
contain the "A5" i want to reference. Do i just add a module to the workbook
and paste that formula in there? (changing of course the reference of the
sheet i am wanting to change)
--
Eric


"Dave Peterson" wrote:

Maybe...

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, me.Range("A5")) Is Nothing Then
Exit Sub
end if
On Error Resume Next
Sheet9999.Name = Trim$(Replace(Me.Range("A5").Value, _
"For The Month Ending ", ""))
On Error Goto 0
End Sub

This looks at A5 of the sheet that owns the code. And it changes the name of
the worksheet that has a code name of Sheet9999.

You can find the codename of the worksheet by opening the VBE (alt-f11).
Showing the project explorer (ctrl-r)
Expanding the workbooks project (like expanding a folder in windows explorer)

Under the Microsoft Objects section, you'll see something like:
Sheet1 (NameYouSeeOnTheWorkSheetTabInExcel)

The codename is the name to the left of the name in ()'s.

You'll have to change that in the code.

And this code goes in the worksheet module for the worksheet that contains the
cell getting changed.

Eric D wrote:

the cell i want to reference is on another tab will this formula still work?
--
Eric

"Harald Staff" wrote:

Absolutely. Rightclick sheet tab, "view code", paste this in:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A5")) Is Nothing Then Exit Sub
On Error Resume Next
Me.Name = Trim$(Replace(Me.Range("A5").Value, _
"For The Month Ending ", ""))
End Sub

HTH. Best wishes Harald

"Eric D" wrote in message
...
I have a template saved. Every month cell A5 = "For The Month Ending
February 2009" for february and this changes for each month. I just want
the a tab to change based on what was pasted in cell A5. Does that make
sense?
--
Eric


"Harald Staff" wrote:

Yes.

You'll need a macro for that. Changing a sheetname causes changes to all
local and remote formulas that depends on cells in this sheet.

So before you ask "which macro", let me ask which specific cell and how
does
it change its value?

Best wishes Harald

"Eric D" wrote in message
...
Is there a way to get a Tab name to reference what is in a specific
cell?
--
Eric





--

Dave Peterson

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Tab name = what's in a cell

Right click on the worksheet tab that contains that A5 that you'll be changing.

Select View code and you'll be there.

Eric D wrote:

hey dave, thanks for the suggestion, but i am very very visual basic
impared, i know nothing ... i don't see a module for the sheet that will
contain the "A5" i want to reference. Do i just add a module to the workbook
and paste that formula in there? (changing of course the reference of the
sheet i am wanting to change)
--
Eric

"Dave Peterson" wrote:

Maybe...

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, me.Range("A5")) Is Nothing Then
Exit Sub
end if
On Error Resume Next
Sheet9999.Name = Trim$(Replace(Me.Range("A5").Value, _
"For The Month Ending ", ""))
On Error Goto 0
End Sub

This looks at A5 of the sheet that owns the code. And it changes the name of
the worksheet that has a code name of Sheet9999.

You can find the codename of the worksheet by opening the VBE (alt-f11).
Showing the project explorer (ctrl-r)
Expanding the workbooks project (like expanding a folder in windows explorer)

Under the Microsoft Objects section, you'll see something like:
Sheet1 (NameYouSeeOnTheWorkSheetTabInExcel)

The codename is the name to the left of the name in ()'s.

You'll have to change that in the code.

And this code goes in the worksheet module for the worksheet that contains the
cell getting changed.

Eric D wrote:

the cell i want to reference is on another tab will this formula still work?
--
Eric

"Harald Staff" wrote:

Absolutely. Rightclick sheet tab, "view code", paste this in:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A5")) Is Nothing Then Exit Sub
On Error Resume Next
Me.Name = Trim$(Replace(Me.Range("A5").Value, _
"For The Month Ending ", ""))
End Sub

HTH. Best wishes Harald

"Eric D" wrote in message
...
I have a template saved. Every month cell A5 = "For The Month Ending
February 2009" for february and this changes for each month. I just want
the a tab to change based on what was pasted in cell A5. Does that make
sense?
--
Eric


"Harald Staff" wrote:

Yes.

You'll need a macro for that. Changing a sheetname causes changes to all
local and remote formulas that depends on cells in this sheet.

So before you ask "which macro", let me ask which specific cell and how
does
it change its value?

Best wishes Harald

"Eric D" wrote in message
...
Is there a way to get a Tab name to reference what is in a specific
cell?
--
Eric





--

Dave Peterson


--

Dave Peterson
  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Tab name = what's in a cell

Just right-click on the appropriate Sheet tab and "View Code"

Copy/paste Dave's code into that module.

Edit to suit then Alt + q to return to Excel window.

Or if you have VBE open already with your your Microsoft Excel Objects
expanded, just double-click on the Sheet1 or 2 or whichever


Gord Dibben MS Excel MVP

On Thu, 5 Mar 2009 12:14:01 -0800, Eric D
wrote:

hey dave, thanks for the suggestion, but i am very very visual basic
impared, i know nothing ... i don't see a module for the sheet that will
contain the "A5" i want to reference. Do i just add a module to the workbook
and paste that formula in there? (changing of course the reference of the
sheet i am wanting to change)


  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 449
Default Tab name = what's in a cell

I told you how to do this. You didn't even test ths code I wrote for you,
did you?


"Eric D" wrote in message
...
hey dave, thanks for the suggestion, but i am very very visual basic
impared, i know nothing ... i don't see a module for the sheet that will
contain the "A5" i want to reference. Do i just add a module to the
workbook
and paste that formula in there? (changing of course the reference of the
sheet i am wanting to change)
--
Eric




  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Tab name = what's in a cell

He did change what he wanted, though.


Harald Staff wrote:

I told you how to do this. You didn't even test ths code I wrote for you,
did you?

"Eric D" wrote in message
...
hey dave, thanks for the suggestion, but i am very very visual basic
impared, i know nothing ... i don't see a module for the sheet that will
contain the "A5" i want to reference. Do i just add a module to the
workbook
and paste that formula in there? (changing of course the reference of the
sheet i am wanting to change)
--
Eric


--

Dave Peterson
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
Populate a cell if values in cell 1 and cell 2 match cell 3 and 4 [email protected] Excel Worksheet Functions 1 August 22nd 08 02:04 AM
How can I copy a value from a cell and paste it into another cell while adding it to the previous value in that cell [email protected] Excel Worksheet Functions 2 November 7th 07 09:39 AM
cell data not validated if navigating cell to cell with mouse LoveThatMouse Excel Worksheet Functions 6 May 21st 06 09:03 PM
How to create/run "cell A equals Cell B put Cell C info in Cell D abmb161 Excel Discussion (Misc queries) 5 January 26th 06 06:36 PM
Cell Formula reference to cell Based On third Cell Content Gabriel Excel Discussion (Misc queries) 0 February 11th 05 05:35 AM


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