Previous in Forum: Windows XP Pro - Access Denied   Next in Forum: Threading Symbols for AutoCAD 2007
Close
Close
Close
25 comments
Rate Comments: Nested
Active Contributor
Engineering Fields - Piping Design Engineering - New Member

Join Date: Oct 2008
Location: Chennai, India
Posts: 15

Renaming Worksheet Tabs in an Excel Workbook

04/02/2009 2:28 AM

Hi All,

At the bottom of the each worksheet in the excel document window is a small tab that indicates the name of the worksheets. In my workbook, sheet names are named like sheet1, sheet2, sheet3, sheet4 and upto sheet25. I want to rename the sheet1, sheet2..... to Proposal1, Proposal2, Proposal3,....upto Proposal25. That means I want to replace "sheet" with "budget". I hope all of you know renaming the sheet names individually is time consuming. Is there any way to use replace all features to change the sheetnames in sheet tab of a workbook. Or any quick way to rename the sheetnames will help.

Advance Thanks

Register to Reply
User-tagged by 1 user
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

Good Answers:

These comments received enough positive votes to make them "good answers".
Guru
United Kingdom - Member - Indeterminate Engineering Fields - Control Engineering - New Member

Join Date: Jan 2007
Location: In the bothy, 7 chains down the line from Dodman's Lane level crossing, in the nation formerly known as Great Britain. Kettle's on.
Posts: 32175
Good Answers: 839
#1

Re: Replacing the name of the worksheet in excel workbook

04/02/2009 4:25 AM
  1. right click on the sheet label
  2. left click on "rename" in the drop-down box
  3. type away
  4. press return
  5. "Robert is your mother's brother."
__________________
"Did you get my e-mail?" - "The biggest problem in communication is the illusion that it has taken place" - George Bernard Shaw, 1856
Register to Reply
Participant

Join Date: Mar 2009
Posts: 1
#5
In reply to #1

Re: Replacing the name of the worksheet in excel workbook

04/02/2009 11:31 PM

Hi, If you are familiar with Visual Basic you could write a short code in order to rename each tab.

If you don´t know you are proficient in VB, just press F11 and you will know.

Thanks and luck.

Register to Reply
Active Contributor

Join Date: Jul 2008
Location: China/Vietnam
Posts: 10
#2

Re: Renaming Worksheet Tabs in an Excel Workbook

04/02/2009 11:02 PM

seems that there is no way to make it as a lot , finish one time.

just change it one by one .

__________________
Jason~Zen
Register to Reply
Anonymous Poster
#3
In reply to #2

Re: Renaming Worksheet Tabs in an Excel Workbook

04/02/2009 11:19 PM

You can select multiple sheets by holding Ctrl button then go through the process PW gave you. I can't remember if it will automatically sequence... to unselect when you finish, single click on an unselected tab.

Register to Reply
Guru
Engineering Fields - Electromechanical Engineering - Technical Services Manager Canada - Member - Army brat Popular Science - Cosmology - What is Time and what is Energy? Technical Fields - Architecture - Draftsperson Hobbies - RC Aircraft - New Member

Join Date: Sep 2006
Location: Clive, Alberta, Canada
Posts: 5916
Good Answers: 204
#10
In reply to #3

Re: Renaming Worksheet Tabs in an Excel Workbook

04/03/2009 3:16 AM

no clicking necessary.. just hit enter, after typing, and the ctrl-pgdn to go to the next sheet, or ctrl-pgup to go to the previous one.

and you can do anything in vba that you can do manually, so don't listen to those who say it can only be done manually. you are ten generations into excel here.. it is the most powerful calculator application on the planet... and has that reputation for a reason.

Chris

Register to Reply
3
Guru
Engineering Fields - Electromechanical Engineering - Technical Services Manager Canada - Member - Army brat Popular Science - Cosmology - What is Time and what is Energy? Technical Fields - Architecture - Draftsperson Hobbies - RC Aircraft - New Member

Join Date: Sep 2006
Location: Clive, Alberta, Canada
Posts: 5916
Good Answers: 204
#4

Re: Renaming Worksheet Tabs in an Excel Workbook

04/02/2009 11:22 PM

the answer is: VBA!

http://excel.tips.net/Pages/T002145_Dynamic_Worksheet_Tab_Names.html

this is just one hit.. you can find more

if you need more help.. just yell

Chris

Register to Reply Good Answer (Score 3)
Active Contributor
Engineering Fields - Piping Design Engineering - New Member

Join Date: Oct 2008
Location: Chennai, India
Posts: 15
#8
In reply to #4

Re: Renaming Worksheet Tabs in an Excel Workbook

04/03/2009 1:14 AM

Thanks Chris, It worked.

Register to Reply
Power-User
Canada - Member - BC Born, Alberta Raised, Quebec (poutine) crazed... Engineering Fields - Aerospace Engineering - An airplane is just a bunch of beams... Hobbies - Model Rocketry - Had fun as a kid...fun stuff Hobbies - CNC - dreaming of cutting Engineering Fields - Control Engineering - PID ME!

Join Date: Aug 2006
Location: Montreal, CANADA
Posts: 368
Good Answers: 10
#11
In reply to #4

Re: Renaming Worksheet Tabs in an Excel Workbook

04/03/2009 7:22 AM

I wrote an inverse to this...dynamically naming a cell the same thing as the sheet!

i.e. So in sheet Budget 234 you can have a title saying Budget 234

Add this in your vb editor:

Function sheetname() As String

sheetname = ActiveSheet.Name

End Function

and then just put =sheetname() in the cell you want the title to show up in and hit enter. tada! The most used one-liner in my arsenal.

So now copy as many of the template sheet as you want...name them whatever you want and have their contents customized a bit automatically! I use this whenever I have loadcase specific calculations (I do stress engineering) or dated data...anything with repetitive sheets and very similar contents.

__________________
kkjensen
Register to Reply
Participant

Join Date: Aug 2009
Posts: 2
#19
In reply to #4

Re: Renaming Worksheet Tabs in an Excel Workbook

08/31/2009 7:21 AM

Hi Chris..

I also used ur "ONE HIT" vba .. BUT......

it is usfull for a new and only one worksheet. If a user has already created more than 30 workbooks with various names. Now He wants to rename all sheets as Product1~Product30..... in this situation how can we use this VBA..

u can email me at tiputhelord@gmail.com

thanks

Adil

Register to Reply
Guru
Engineering Fields - Electromechanical Engineering - Technical Services Manager Canada - Member - Army brat Popular Science - Cosmology - What is Time and what is Energy? Technical Fields - Architecture - Draftsperson Hobbies - RC Aircraft - New Member

Join Date: Sep 2006
Location: Clive, Alberta, Canada
Posts: 5916
Good Answers: 204
#20
In reply to #19

Re: Renaming Worksheet Tabs in an Excel Workbook

08/31/2009 12:59 PM

the following will help to flip through the collection of tabs in a sheet.

Sub NextSheet()
Dim lCount As Long

lCount = Sheets.Count

If ActiveSheet.Index = lCount Then
Sheets(1).Select
Else
Sheets(ActiveSheet.Index + 1).Select
End If

End Sub

source discussion:

http://www.ozgrid.com/forum/showthread.php?t=55989

Chris

Register to Reply
Participant

Join Date: Aug 2009
Posts: 2
#21
In reply to #20

Re: Renaming Worksheet Tabs in an Excel Workbook

09/01/2009 2:18 AM

Hi chris

Thanks 4 ur quick reply

I copy this If Then Else Statement ditto.. after pressing Alt+F11. and when I run Macro.. It' doesn't work....

May be I m not familiar to this VBA Environment or there may be some other problem...

Register to Reply Off Topic (Score 5)
Guru
Engineering Fields - Electromechanical Engineering - Technical Services Manager Canada - Member - Army brat Popular Science - Cosmology - What is Time and what is Energy? Technical Fields - Architecture - Draftsperson Hobbies - RC Aircraft - New Member

Join Date: Sep 2006
Location: Clive, Alberta, Canada
Posts: 5916
Good Answers: 204
#22
In reply to #21

Re: Renaming Worksheet Tabs in an Excel Workbook

09/01/2009 8:43 AM

Hi,

I'm out of province right now, and will be away for the next week, but if you want to send your sheet, or a reasonable sample to me at chrisg288@hotmail.com, I will look at it. Are you running on 2003 or 2007?

Chris

Register to Reply Off Topic (Score 5)
2
Associate

Join Date: Jun 2008
Location: Gujarat
Posts: 43
Good Answers: 1
#6

Re: Renaming Worksheet Tabs in an Excel Workbook

04/03/2009 12:30 AM

Hi ,

Try this . It'll work .

1. open the xls file .

2. Press Alt+F8.

3. Give a macro name .

4. Press create button . It will go to VB Editor.

5. Copy the following code before the end sub.

Const sBase As String = "Budget"
Dim i As Long
Dim sh As Object
For Each sh In ActiveWorkbook.Sheets
i = i + 1
sh.Name = sBase & i
Next sh

Save it .

Run the program by pressing ALT+F8.

The macro will rename all your sheets at once.

Regards

Earnest.

Register to Reply Good Answer (Score 2)
Active Contributor
Engineering Fields - Piping Design Engineering - New Member

Join Date: Oct 2008
Location: Chennai, India
Posts: 15
#7
In reply to #6

Re: Renaming Worksheet Tabs in an Excel Workbook

04/03/2009 12:51 AM

Earnest,

Hats off!

Thank you very much, it worked.

Nayek

Register to Reply
Participant

Join Date: Jan 2012
Posts: 1
#25
In reply to #6

Re: Renaming Worksheet Tabs in an Excel Workbook

01/24/2012 12:45 PM

Dear earnest

I used to work with a excel book contain 35 sheets at least.

I used to change all tabs name manually.

pls give me a way to come out from this

I am very new to VB

pls u can email me with attaching a sample excel file : CR4 Admin - email address removed

From the CR4 Rules: Do not post phone numbers or email addresses. The CR4 Admin will delete all phone numbers and email addresses posted in threads or comments. You can share this information via the CR4 internal messaging system.

Register to Reply
Active Contributor

Join Date: Feb 2009
Posts: 12
#9

Re: Renaming Worksheet Tabs in an Excel Workbook

04/03/2009 2:30 AM

No there is only one way which you already know.....Bali

Register to Reply
Anonymous Poster
#12

Re: Renaming Worksheet Tabs in an Excel Workbook

04/03/2009 8:22 AM

Right click on the tab and rename it.

Register to Reply
Anonymous Poster
#13

Re: Renaming Worksheet Tabs in an Excel Workbook

04/03/2009 10:04 AM

If you right click on the tab it will give you the option to rename that tab you chose.

Register to Reply
2
Guru
Popular Science - Weaponology - New Member Engineering Fields - Engineering Physics - New Member Engineering Fields - Nuclear Engineering - New Member

Join Date: Dec 2007
Location: No. VA, USA (No, it does NOTu mean "won't go"!)
Posts: 1796
Good Answers: 75
#14

Re: Renaming Worksheet Tabs in an Excel Workbook

04/03/2009 12:15 PM

#14. The reason ALL "Guest" answers get such short shrift. What an idiot!!

No understanding of the idea that we answer because we LIKE to offer information, in exchange for information. And Navek undoubtedly knows SOMETHING I will need to know, but don't even realize I will need to know it.

I came here to offer a solution to the problem. I still haven't seen MY solution offered, but I've found several so far ahead of it, I'm not even going to bother. I like your answers SO much better! ANd that, too, is a great reason we even bother.

The real question is, with an attitude like that, why does the "guest" even bother to breathe?

Micah

__________________
Been away a while. Miss all my old friends. Some of you I KNOW are still around. Where are the rest?
Register to Reply Good Answer (Score 2)
Active Contributor

Join Date: Nov 2008
Location: Calgary AB
Posts: 21
Good Answers: 2
#15

Re: Renaming Worksheet Tabs in an Excel Workbook

04/03/2009 12:58 PM

To guest / 'Blonde' commentor about free info. I've found the best answers happen when people Read the post properly before flying off the cuff.

Go back and re-read the post, the originator was looking for a way to do multiple sheet renames an with an incremental replacement rather than doing it the individual way - Not likely a "homewaork" problem. It's a question that has occurred to me while renaming sheets manually. The solutions offered here are fantastic, unique and I will use.

I appreciate the willingness of people to contribute and share, that's the way I prefer to advance the knowledge and experience of my staff. If you don't feel that sharing is appropriate and that people should be derided for asking questions or offering solutions, then perhaps this isn't the forum for you.

And if they are blonde, that's fine too.

Register to Reply
Guru
Popular Science - Weaponology - New Member Engineering Fields - Engineering Physics - New Member Engineering Fields - Nuclear Engineering - New Member

Join Date: Dec 2007
Location: No. VA, USA (No, it does NOTu mean "won't go"!)
Posts: 1796
Good Answers: 75
#16
In reply to #15

Re: Renaming Worksheet Tabs in an Excel Workbook

04/03/2009 1:24 PM

You and me both,. brother.

Bravo.

Micah

__________________
Been away a while. Miss all my old friends. Some of you I KNOW are still around. Where are the rest?
Register to Reply
Guru
Hobbies - HAM Radio - New Member

Join Date: Oct 2006
Location: Vancouver (not BC) Washington (not DC) US of A
Posts: 1261
Good Answers: 12
#17

Re: Renaming Worksheet Tabs in an Excel Workbook

04/05/2009 2:16 AM

I learned something out of this!! And I used to be blonde (before Excel was invented) and I even tried dancing around a hat naked, but it didn't get me any women... in fact they all ran away.

Bill

Register to Reply
Active Contributor
Engineering Fields - Piping Design Engineering - New Member

Join Date: Oct 2008
Location: Chennai, India
Posts: 15
#18

Re: Renaming Worksheet Tabs in an Excel Workbook

04/06/2009 3:29 AM

Dear Guest,

Please reread the question I posted. Everybody knows how to rename a sheet manually in excel. My question is how to rename multiple sheets quickly like using replace feature to replace value in multiple cells. This is not a homework project.

Everyone gives valuable answer in this forum for free. I appreciate everyone who given answers. This forum is for sharing knowledge. I think this forum is not for you.

YOU ARE GIVING NON-SENSE THINGS FOR FREE. THIS FORUM IS NOT FOR YOU.

WHAT KIIND OF HUMAN BEING (GUEST) ARE YOU

Nayek

Register to Reply
Anonymous Poster
#23

Re: Renaming Worksheet Tabs in an Excel Workbook

09/01/2010 8:05 PM

I had 200+ sheets to rename and that little macro did it instantly.

Thanking you

Register to Reply
Guru
Engineering Fields - Electromechanical Engineering - Technical Services Manager Canada - Member - Army brat Popular Science - Cosmology - What is Time and what is Energy? Technical Fields - Architecture - Draftsperson Hobbies - RC Aircraft - New Member

Join Date: Sep 2006
Location: Clive, Alberta, Canada
Posts: 5916
Good Answers: 204
#24
In reply to #23

Re: Renaming Worksheet Tabs in an Excel Workbook

09/01/2010 11:09 PM

To whom are you speaking?

Register to Reply
Register to Reply 25 comments

Good Answers:

These comments received enough positive votes to make them "good answers".
Copy to Clipboard

Users who posted comments:

ad2ad79 (2); Anonymous Poster (4); Bali (1); chrisg288 (5); earnestpaul (1); FAHMED (1); jasonzen (1); JoseLuis (1); kkjensen (1); micahd02 (2); Nayek (3); PWSlack (1); rjyou (1); Sciesis2 (1)

Previous in Forum: Windows XP Pro - Access Denied   Next in Forum: Threading Symbols for AutoCAD 2007

Advertisement