Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Tony4X4
 
Posts: n/a
Default Naming sheets from a cell value

Hi there,
Thanks for reading my question.
Is it possible to name a sheet from a cell value with in the sheet? i.e. I
have 12 sheets, each sheet represents a month and the month value is in cell
A1. Can I rename a sheet by refering to cell A1 instead of manually renaming
the sheets to January, February etc.

Many thanks

Tony
  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

See

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

In article ,
"Tony4X4" wrote:

Hi there,
Thanks for reading my question.
Is it possible to name a sheet from a cell value with in the sheet? i.e. I
have 12 sheets, each sheet represents a month and the month value is in cell
A1. Can I rename a sheet by refering to cell A1 instead of manually renaming
the sheets to January, February etc.

Many thanks

Tony

  #3   Report Post  
Tony4X4
 
Posts: n/a
Default

Thanks for the quick response. Stupid question! When does the code get
executed? I tried pressing F9, or do I have to change something?

Thanks again

"JE McGimpsey" wrote:

See

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

In article ,
"Tony4X4" wrote:

Hi there,
Thanks for reading my question.
Is it possible to name a sheet from a cell value with in the sheet? i.e. I
have 12 sheets, each sheet represents a month and the month value is in cell
A1. Can I rename a sheet by refering to cell A1 instead of manually renaming
the sheets to January, February etc.

Many thanks

Tony


  #4   Report Post  
JE McGimpsey
 
Posts: n/a
Default

If you put it in the worksheet code module, per the instructions, the
macro will fire whenever a cell in the sheet is changed manually.

In article ,
"Tony4X4" wrote:

Thanks for the quick response. Stupid question! When does the code get
executed? I tried pressing F9, or do I have to change something?

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 144
Default Naming sheets from a cell value

Hi ..I am really green at this.. could you please help me by starting with
where to creat this macro .. I have tried.. cannot seem to make it happen

"JE McGimpsey" wrote:

See

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

In article ,
"Tony4X4" wrote:

Hi there,
Thanks for reading my question.
Is it possible to name a sheet from a cell value with in the sheet? i.e. I
have 12 sheets, each sheet represents a month and the month value is in cell
A1. Can I rename a sheet by refering to cell A1 instead of manually renaming
the sheets to January, February etc.

Many thanks

Tony




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 144
Default Naming sheets from a cell value

can we take this abit farther? I'd like then tab names to come up in reverse
order..is there away of doing this? e.g going from left to right December to
the left and January to the far right? also if there is a date formula in A1
how do I change the macro as it wants only to read text..

"kathy" wrote:

Hi ..I am really green at this.. could you please help me by starting with
where to creat this macro .. I have tried.. cannot seem to make it happen

"JE McGimpsey" wrote:

See

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

In article ,
"Tony4X4" wrote:

Hi there,
Thanks for reading my question.
Is it possible to name a sheet from a cell value with in the sheet? i.e. I
have 12 sheets, each sheet represents a month and the month value is in cell
A1. Can I rename a sheet by refering to cell A1 instead of manually renaming
the sheets to January, February etc.

Many thanks

Tony


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Naming sheets from a cell value

I don't see the first part of the thread but try

sub namesheets()
for i=1 to 12
sheets(i).name=sheets(i).range("a1")
next
end sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"kathy" wrote in message
...
can we take this abit farther? I'd like then tab names to come up in
reverse
order..is there away of doing this? e.g going from left to right December
to
the left and January to the far right? also if there is a date formula in
A1
how do I change the macro as it wants only to read text..

"kathy" wrote:

Hi ..I am really green at this.. could you please help me by starting
with
where to creat this macro .. I have tried.. cannot seem to make it happen

"JE McGimpsey" wrote:

See

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

In article ,
"Tony4X4" wrote:

Hi there,
Thanks for reading my question.
Is it possible to name a sheet from a cell value with in the sheet?
i.e. I
have 12 sheets, each sheet represents a month and the month value is
in cell
A1. Can I rename a sheet by refering to cell A1 instead of manually
renaming
the sheets to January, February etc.

Many thanks

Tony


  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 144
Default Naming sheets from a cell value

this is what I was working from just want the dates to appear on the tabs in
reverse order from what this does..

"Don Guillett" wrote:

I don't see the first part of the thread but try

sub namesheets()
for i=1 to 12
sheets(i).name=sheets(i).range("a1")
next
end sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"kathy" wrote in message
...
can we take this abit farther? I'd like then tab names to come up in
reverse
order..is there away of doing this? e.g going from left to right December
to
the left and January to the far right? also if there is a date formula in
A1
how do I change the macro as it wants only to read text..

"kathy" wrote:

Hi ..I am really green at this.. could you please help me by starting
with
where to creat this macro .. I have tried.. cannot seem to make it happen

"JE McGimpsey" wrote:

See

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

In article ,
"Tony4X4" wrote:

Hi there,
Thanks for reading my question.
Is it possible to name a sheet from a cell value with in the sheet?
i.e. I
have 12 sheets, each sheet represents a month and the month value is
in cell
A1. Can I rename a sheet by refering to cell A1 instead of manually
renaming
the sheets to January, February etc.

Many thanks

Tony



  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 144
Default Naming sheets from a cell value

yup yup that works.. thanks

"Don Guillett" wrote:

for 12 to 1 step -1

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"kathy" wrote in message
...
this is what I was working from just want the dates to appear on the tabs
in
reverse order from what this does..

"Don Guillett" wrote:

I don't see the first part of the thread but try

sub namesheets()
for i=1 to 12
sheets(i).name=sheets(i).range("a1")
next
end sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"kathy" wrote in message
...
can we take this abit farther? I'd like then tab names to come up in
reverse
order..is there away of doing this? e.g going from left to right
December
to
the left and January to the far right? also if there is a date formula
in
A1
how do I change the macro as it wants only to read text..

"kathy" wrote:

Hi ..I am really green at this.. could you please help me by starting
with
where to creat this macro .. I have tried.. cannot seem to make it
happen

"JE McGimpsey" wrote:

See

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

In article ,
"Tony4X4" wrote:

Hi there,
Thanks for reading my question.
Is it possible to name a sheet from a cell value with in the
sheet?
i.e. I
have 12 sheets, each sheet represents a month and the month value
is
in cell
A1. Can I rename a sheet by refering to cell A1 instead of
manually
renaming
the sheets to January, February etc.

Many thanks

Tony







  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 144
Default Naming sheets from a cell value

here is one more that worked but now is giving me a"compile error code
-variable not defined"
on the "intTemp = 2"part
here is the whole thing..

Sub createmonthsheets()
'Dim intTemp
Dim dtTemp As Date
dtTemp = "Jan 10"
ActiveWorkbook.Sheets.Add Count:=(12 - 1 - ActiveWorkbook.Sheets.Count)
For intTemp = 2 To ActiveWorkbook.Sheets.Count
ActiveWorkbook.Sheets(intTemp).Name = _
Format(DateAdd("y", (intTemp - 2), dtTemp), "mmm-yy")
Next
ActiveWorkbook.Save
End Sub

"kathy" wrote:

yup yup that works.. thanks

"Don Guillett" wrote:

for 12 to 1 step -1

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"kathy" wrote in message
...
this is what I was working from just want the dates to appear on the tabs
in
reverse order from what this does..

"Don Guillett" wrote:

I don't see the first part of the thread but try

sub namesheets()
for i=1 to 12
sheets(i).name=sheets(i).range("a1")
next
end sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"kathy" wrote in message
...
can we take this abit farther? I'd like then tab names to come up in
reverse
order..is there away of doing this? e.g going from left to right
December
to
the left and January to the far right? also if there is a date formula
in
A1
how do I change the macro as it wants only to read text..

"kathy" wrote:

Hi ..I am really green at this.. could you please help me by starting
with
where to creat this macro .. I have tried.. cannot seem to make it
happen

"JE McGimpsey" wrote:

See

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

In article ,
"Tony4X4" wrote:

Hi there,
Thanks for reading my question.
Is it possible to name a sheet from a cell value with in the
sheet?
i.e. I
have 12 sheets, each sheet represents a month and the month value
is
in cell
A1. Can I rename a sheet by refering to cell A1 instead of
manually
renaming
the sheets to January, February etc.

Many thanks

Tony





  #12   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Naming sheets from a cell value

Have you tried un-commenting Dim intTemp


Gord Dibben MS Excel MVP

On Thu, 3 Sep 2009 12:29:02 -0700, kathy
wrote:

here is one more that worked but now is giving me a"compile error code
-variable not defined"
on the "intTemp = 2"part
here is the whole thing..

Sub createmonthsheets()
'Dim intTemp
Dim dtTemp As Date
dtTemp = "Jan 10"
ActiveWorkbook.Sheets.Add Count:=(12 - 1 - ActiveWorkbook.Sheets.Count)
For intTemp = 2 To ActiveWorkbook.Sheets.Count
ActiveWorkbook.Sheets(intTemp).Name = _
Format(DateAdd("y", (intTemp - 2), dtTemp), "mmm-yy")
Next
ActiveWorkbook.Save
End Sub

"kathy" wrote:

yup yup that works.. thanks

"Don Guillett" wrote:

for 12 to 1 step -1

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"kathy" wrote in message
...
this is what I was working from just want the dates to appear on the tabs
in
reverse order from what this does..

"Don Guillett" wrote:

I don't see the first part of the thread but try

sub namesheets()
for i=1 to 12
sheets(i).name=sheets(i).range("a1")
next
end sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"kathy" wrote in message
...
can we take this abit farther? I'd like then tab names to come up in
reverse
order..is there away of doing this? e.g going from left to right
December
to
the left and January to the far right? also if there is a date formula
in
A1
how do I change the macro as it wants only to read text..

"kathy" wrote:

Hi ..I am really green at this.. could you please help me by starting
with
where to creat this macro .. I have tried.. cannot seem to make it
happen

"JE McGimpsey" wrote:

See

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

In article ,
"Tony4X4" wrote:

Hi there,
Thanks for reading my question.
Is it possible to name a sheet from a cell value with in the
sheet?
i.e. I
have 12 sheets, each sheet represents a month and the month value
is
in cell
A1. Can I rename a sheet by refering to cell A1 instead of
manually
renaming
the sheets to January, February etc.

Many thanks

Tony






  #13   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 144
Default Naming sheets from a cell value

yes that got the thing to run but I still have the months listed as Jan to
December left to right and I need them the other direction Dec to Jan left to
right.. I appreciate your input..

"Gord Dibben" wrote:

Have you tried un-commenting Dim intTemp


Gord Dibben MS Excel MVP

On Thu, 3 Sep 2009 12:29:02 -0700, kathy
wrote:

here is one more that worked but now is giving me a"compile error code
-variable not defined"
on the "intTemp = 2"part
here is the whole thing..

Sub createmonthsheets()
'Dim intTemp
Dim dtTemp As Date
dtTemp = "Jan 10"
ActiveWorkbook.Sheets.Add Count:=(12 - 1 - ActiveWorkbook.Sheets.Count)
For intTemp = 2 To ActiveWorkbook.Sheets.Count
ActiveWorkbook.Sheets(intTemp).Name = _
Format(DateAdd("y", (intTemp - 2), dtTemp), "mmm-yy")
Next
ActiveWorkbook.Save
End Sub

"kathy" wrote:

yup yup that works.. thanks

"Don Guillett" wrote:

for 12 to 1 step -1

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"kathy" wrote in message
...
this is what I was working from just want the dates to appear on the tabs
in
reverse order from what this does..

"Don Guillett" wrote:

I don't see the first part of the thread but try

sub namesheets()
for i=1 to 12
sheets(i).name=sheets(i).range("a1")
next
end sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"kathy" wrote in message
...
can we take this abit farther? I'd like then tab names to come up in
reverse
order..is there away of doing this? e.g going from left to right
December
to
the left and January to the far right? also if there is a date formula
in
A1
how do I change the macro as it wants only to read text..

"kathy" wrote:

Hi ..I am really green at this.. could you please help me by starting
with
where to creat this macro .. I have tried.. cannot seem to make it
happen

"JE McGimpsey" wrote:

See

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

In article ,
"Tony4X4" wrote:

Hi there,
Thanks for reading my question.
Is it possible to name a sheet from a cell value with in the
sheet?
i.e. I
have 12 sheets, each sheet represents a month and the month value
is
in cell
A1. Can I rename a sheet by refering to cell A1 instead of
manually
renaming
the sheets to January, February etc.

Many thanks

Tony







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
copying cell names Al Excel Discussion (Misc queries) 12 August 11th 05 03:01 PM
Cell Reference, Multiple Sheets CazMan007 Excel Worksheet Functions 1 July 22nd 05 03:31 PM
Copy cell values across separate sheets claytorm Excel Discussion (Misc queries) 3 June 27th 05 10:03 PM
Copying the same cell from different sheets Steve Excel Discussion (Misc queries) 2 March 16th 05 07:43 PM
One cell from several sheets to one column Kel Excel Discussion (Misc queries) 5 February 17th 05 02:33 AM


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