Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
calibronco
 
Posts: n/a
Default renaming worksheet tabs

How can I rename the worksheet tabs at one time. EXAMPLE: I created a months
work of worksheets for the month of JANUARY. Now I need to change them to
FEBRUARY. Jan-1,Jan-2,Jan3 to Feb-1,Feb2,Feb3 without ahve to go to each tab.

Can it be done?

  #2   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett
 
Posts: n/a
Default renaming worksheet tabs

try this
Sub changewsname()
newmonth = InputBox("Enter 3 letter code for month desired")
For Each ws In Worksheets
If Left(ws.Name, 5) < "Sheet" _
And IsNumeric(Right(ws.Name, 1)) Then
ws.Name = Application.Proper _
(newmonth & Right(ws.Name, Len(ws.Name) - 3))
End If
Next ws
End Sub

--
Don Guillett
SalesAid Software

"calibronco" wrote in message
...
How can I rename the worksheet tabs at one time. EXAMPLE: I created a
months
work of worksheets for the month of JANUARY. Now I need to change them to
FEBRUARY. Jan-1,Jan-2,Jan3 to Feb-1,Feb2,Feb3 without ahve to go to each
tab.

Can it be done?



  #3   Report Post  
Posted to microsoft.public.excel.misc
calibronco
 
Posts: n/a
Default renaming worksheet tabs

Don,
Where exactly do I insert this formula?

calibronco

"Don Guillett" wrote:

try this
Sub changewsname()
newmonth = InputBox("Enter 3 letter code for month desired")
For Each ws In Worksheets
If Left(ws.Name, 5) < "Sheet" _
And IsNumeric(Right(ws.Name, 1)) Then
ws.Name = Application.Proper _
(newmonth & Right(ws.Name, Len(ws.Name) - 3))
End If
Next ws
End Sub

--
Don Guillett
SalesAid Software

"calibronco" wrote in message
...
How can I rename the worksheet tabs at one time. EXAMPLE: I created a
months
work of worksheets for the month of JANUARY. Now I need to change them to
FEBRUARY. Jan-1,Jan-2,Jan3 to Feb-1,Feb2,Feb3 without ahve to go to each
tab.

Can it be done?




  #4   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben
 
Posts: n/a
Default renaming worksheet tabs

Sub namesheets()
Dim i As Date
i = DateValue("Feb-1-2006")
For Each ws In Worksheets
ws.Name = Format(i, "mmm-d")
i = i + 1
Next
End Sub

I'll leave you to decide what to do with the 3 leftover sheets Jan-29, Jan-30
and Jan-31


Gord Dibben Excel MVP

On Fri, 25 Nov 2005 14:59:02 -0800, "calibronco"
wrote:

How can I rename the worksheet tabs at one time. EXAMPLE: I created a months
work of worksheets for the month of JANUARY. Now I need to change them to
FEBRUARY. Jan-1,Jan-2,Jan3 to Feb-1,Feb2,Feb3 without ahve to go to each tab.

Can it be done?


  #5   Report Post  
Posted to microsoft.public.excel.misc
calibronco
 
Posts: n/a
Default renaming worksheet tabs

Gord,

I'm still lost. I do not know where to insert this formula in an excel
sheet.

Help...

"Gord Dibben" wrote:

Sub namesheets()
Dim i As Date
i = DateValue("Feb-1-2006")
For Each ws In Worksheets
ws.Name = Format(i, "mmm-d")
i = i + 1
Next
End Sub

I'll leave you to decide what to do with the 3 leftover sheets Jan-29, Jan-30
and Jan-31


Gord Dibben Excel MVP

On Fri, 25 Nov 2005 14:59:02 -0800, "calibronco"
wrote:

How can I rename the worksheet tabs at one time. EXAMPLE: I created a months
work of worksheets for the month of JANUARY. Now I need to change them to
FEBRUARY. Jan-1,Jan-2,Jan3 to Feb-1,Feb2,Feb3 without ahve to go to each tab.

Can it be done?





  #6   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben
 
Posts: n/a
Default renaming worksheet tabs

It is not a worksheet formula. It is a VBA macro.

If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + R to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the namesheets(or Don's changewsname)
code in there. Save the workbook and hit ALT + Q to return to your workbook.

Run the macro by going to ToolMacroMacros.

To assign to a button on your Toolbar........

ToolsCustomizeCommands

Scroll down to and select Macros.

Drag the smiley face button to a Toolbar. Right-click on it and "assign
macro".

Pick the namesheets(or Don's) macro and OK.


Gord

On Fri, 25 Nov 2005 16:14:02 -0800, "calibronco"
wrote:

Gord,

I'm still lost. I do not know where to insert this formula in an excel
sheet.

Help...

"Gord Dibben" wrote:

Sub namesheets()
Dim i As Date
i = DateValue("Feb-1-2006")
For Each ws In Worksheets
ws.Name = Format(i, "mmm-d")
i = i + 1
Next
End Sub

I'll leave you to decide what to do with the 3 leftover sheets Jan-29, Jan-30
and Jan-31


Gord Dibben Excel MVP

On Fri, 25 Nov 2005 14:59:02 -0800, "calibronco"
wrote:

How can I rename the worksheet tabs at one time. EXAMPLE: I created a months
work of worksheets for the month of JANUARY. Now I need to change them to
FEBRUARY. Jan-1,Jan-2,Jan3 to Feb-1,Feb2,Feb3 without ahve to go to each tab.

Can it be done?




  #7   Report Post  
Posted to microsoft.public.excel.misc
calibronco
 
Posts: n/a
Default renaming worksheet tabs

Still lost! I don't know exactly where I insert this formula.

Help...

"Gord Dibben" wrote:

Sub namesheets()
Dim i As Date
i = DateValue("Feb-1-2006")
For Each ws In Worksheets
ws.Name = Format(i, "mmm-d")
i = i + 1
Next
End Sub

I'll leave you to decide what to do with the 3 leftover sheets Jan-29, Jan-30
and Jan-31


Gord Dibben Excel MVP

On Fri, 25 Nov 2005 14:59:02 -0800, "calibronco"
wrote:

How can I rename the worksheet tabs at one time. EXAMPLE: I created a months
work of worksheets for the month of JANUARY. Now I need to change them to
FEBRUARY. Jan-1,Jan-2,Jan3 to Feb-1,Feb2,Feb3 without ahve to go to each tab.

Can it be done?



  #8   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default renaming worksheet tabs

These are not formulas that go into the worksheet.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

calibronco wrote:

Still lost! I don't know exactly where I insert this formula.

Help...

"Gord Dibben" wrote:

Sub namesheets()
Dim i As Date
i = DateValue("Feb-1-2006")
For Each ws In Worksheets
ws.Name = Format(i, "mmm-d")
i = i + 1
Next
End Sub

I'll leave you to decide what to do with the 3 leftover sheets Jan-29, Jan-30
and Jan-31


Gord Dibben Excel MVP

On Fri, 25 Nov 2005 14:59:02 -0800, "calibronco"
wrote:

How can I rename the worksheet tabs at one time. EXAMPLE: I created a months
work of worksheets for the month of JANUARY. Now I need to change them to
FEBRUARY. Jan-1,Jan-2,Jan3 to Feb-1,Feb2,Feb3 without ahve to go to each tab.

Can it be done?




--

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
Worksheet Tabs Missing! Training Spec. Excel Discussion (Misc queries) 3 October 21st 05 02:29 PM
Worksheet Tabs Giver Excel Worksheet Functions 3 October 16th 05 07:09 PM
Comparing a list to a Calendar worksheet. PatrickL Excel Worksheet Functions 0 August 25th 05 04:21 PM
How do I work with the "dialogs" I can insert as worksheet tabs? Jerryclick Excel Worksheet Functions 1 August 8th 05 08:56 PM
How do I make Excel worksheet tabs change appearance when chosen . fentrkn Excel Discussion (Misc queries) 1 March 14th 05 05:36 PM


All times are GMT +1. The time now is 03:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"