Worksheet tab names

Is there an automatic way to rename worksheet tabs as per cell content.
For example in cell C2, if there is name Smith i would like to rename the
worksheet as Smith.

Thanks in advance.
Regards
Jed




0
12/5/2003 8:54:44 AM
excel.misc 78881 articles. 5 followers. Follow

4 Replies
527 Views

Similar Articles

[PageSpeed] 4

Code
-------------------
  Sub renamer()
  ActiveSheet.Name = Range("C2").Value
  End Su
-------------------


Hope this helps,

Wil

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com

~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements
0
12/5/2003 9:26:20 AM
Try the macro below (paste in general module)
on a *back-up* copy of your file:

It loops through all worksheets (assumed identical structure)
and renames each sheet with what's in C2 [of each sheet], all at one go.

(It's assumed C2 will hold for example, text - different for each sheet,
and with no illegal characters, etc)

Sub RenameWS()
    Dim ws As Worksheet
    For Each ws In ActiveWorkbook.Worksheets
        ws.Activate
        ws.Name = Range("C2").Value
    Next
End Sub

--
hth
Max
-----------------------------------------
Please reply in thread

Use xdemechanik <at>yahoo<dot>com for email
-------------------------------------------------------
"Jed" <vinod.jethwa@baesystems.com> wrote in message
news:3fd046ee$1@baen1673807.greenlnk.net...
> Is there an automatic way to rename worksheet tabs as per cell content.
> For example in cell C2, if there is name Smith i would like to rename the
> worksheet as Smith.
>
> Thanks in advance.
> Regards
> Jed


0
demechanik (4694)
12/5/2003 9:56:01 AM
Thanks Max,
That's what i was looking for. Your response is much appreciated.

Regards
Jed

"Max" <demechanik@yahoo.com> wrote in message
news:Oaps$XxuDHA.3496@TK2MSFTNGP11.phx.gbl...
> Try the macro below (paste in general module)
> on a *back-up* copy of your file:
>
> It loops through all worksheets (assumed identical structure)
> and renames each sheet with what's in C2 [of each sheet], all at one go.
>
> (It's assumed C2 will hold for example, text - different for each sheet,
> and with no illegal characters, etc)
>
> Sub RenameWS()
>     Dim ws As Worksheet
>     For Each ws In ActiveWorkbook.Worksheets
>         ws.Activate
>         ws.Name = Range("C2").Value
>     Next
> End Sub
>
> --
> hth
> Max
> -----------------------------------------
> Please reply in thread
>
> Use xdemechanik <at>yahoo<dot>com for email
> -------------------------------------------------------
> "Jed" <vinod.jethwa@baesystems.com> wrote in message
> news:3fd046ee$1@baen1673807.greenlnk.net...
> > Is there an automatic way to rename worksheet tabs as per cell content.
> > For example in cell C2, if there is name Smith i would like to rename
the
> > worksheet as Smith.
> >
> > Thanks in advance.
> > Regards
> > Jed
>
>


0
12/5/2003 10:35:15 AM
you're welcome Jed!
Thanks for feedback

cheers
Max
-----------------------------------------
Please reply in thread

Use xdemechanik <at>yahoo<dot>com for email
-------------------------------------------------------
"Jed" <vinod.jethwa@baesystems.com> wrote in message
news:3fd05e7c$1@baen1673807.greenlnk.net...
> Thanks Max,
> That's what i was looking for. Your response is much appreciated.
>
> Regards
> Jed


0
demechanik (4694)
12/5/2003 10:40:11 AM
Reply:

Similar Artilces:

Can I change names of fields in calendar?
I am using a calendar like a project manager. I would like to change the names of fields eg Location to Action to be done, Contacts to Action officer. I have been able to change the column headings in Custome view, but this doesn't change teh names of the fields on the calendar form. That is teh form that appears when you make an appointment. No, you can't change them. You could use in-cell editing and create the items in table view, where the column display names can be changed. -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook &a...

Employee Name Change
We had an employee get married who is also a user in CRM. When we changed her name in Active Directory, it did not change in CRM. Now when the user tries to run a report, the reports do not run. She gets error message "The property ‘nullable’ of report parameter ‘CRM_Locale’ is set to false. However, the corresponding parameter (default) value is null or contains an empty string. (rsProcessingError)" So we disabled her account in CRM and tried to add in the newly renamed account but CRM would not let us stating that the user was already in the system. Please advise. ...

FRx export to Pivot Table
when exporting FRx report to pivot table, is it possible to retain the column name as in FRx report (eg: YTD MAY 2009, MTD MAY 2009) rather than 2009 Period 5 or YTD for Period 5? ...

How to set up pivot to show name of series item in bar chart
I have data on 30 issues. Each issue has multiple characteristics, e.g., magnitude, frequency, cost-to-fix, root cause, etc. I want the issues stacked in a bar chart to depict: 1) Issues by magnitude -with an ID for each issue ( I can get the hover to show the ID/name and other data. I want only the ID/name and want it fixed in the chart, not on hover only. I tried TM's hover macro, and though I had trouble installing it, it doesn't seeem to give me what I want. ) 2) Issues by magnitue by frequency - same story, I want to see the issue no. in the printed bar chart. Any advice wou...

there are no item in inbox, i have click on send/receive tab many
there are no item in inbox, i have click on send/receive tab many time "uttam" <uttam@discussions.microsoft.com> wrote in message news:428FA040-E7B5-47E6-B611-FB1748D71FD2@microsoft.com... > there are no item in inbox, i have click on send/receive tab many time What happens? Do you get any error messages? Did you turn on diagnostic logging to see what's happening during the send/receive? http://support.microsoft.com/kb/300479 -- Brian Tillman [MVP-Outlook] if you switch folders, do the messages show up? -- Diane Poremsky [MVP - Outlook] Outlook Tips: http:/...

Protecting Multiple Worksheets
Is there a way to protect more than one worksheet at a time? Dave I think you need only protect the worksheets you want protected: select menu\tools\protection\protect worksheet for each worksheet. >-----Original Message----- >Is there a way to protect more than one worksheet at a >time? > >Dave >. > This macro will protect all the sheets that are selected: Public Sub ProtectSelectedSheets Const PWORD As String = "drowssap" Dim wkSht As Worksheet For Each wkSht In ActiveWindow.SelectedSheets wkSht.Protect Passwor...

Copy Worksheet to Preserve Page Set Up
I have a workbook with a very detailed worksheet that I want to copy onto addtional worksheets to run different scenarios. I can easily copy the worksheet but it doesn't preserve the detailed page set up for printing. How do you get it to copy the page set up too? Thanks Uzytkownik "TiChNi" <TCNICHOLS@YAHOO.COM> napisal w wiadomosci news:1114535445.503200.260140@z14g2000cwz.googlegroups.com... > I have a workbook with a very detailed worksheet that I want to copy > onto addtional worksheets to run different scenarios. I can easily > copy the worksheet but it...

worksheet nested if
i am trying to write an if statment that will do the following if c8="p" then y20 if c9="p" then y21 if c8&c9="p" then y20+y21 if c8="c" then nil if c9="c" then nil this statment works for the C8 & C9 inputs from strategy sheet 1 at a time but i am having problems with the sum part =IF('Strategy Evaluation'!C8="P",Y20*AB20-AD9,IF('Strategy Evaluation'!C9="P",Y21*AB21-AD9," ")) =IF('Strategy Evaluation'!C8="P",Y20*AB20-AD9,IF('Strategy Evaluation'!C9="P&q...

counting rows across multiple worksheets
I am trying to count and add all rows populated with values across multiple worksheets. Is there an easy way to do this? The *easiest* way is to perform the count and/or the totaling on each individual sheet in the *same* relative cell. So, say the count is displayed in X100 on *all* sheets, And the sum is displayed in X101 on *all* sheets. On the main sheet, use formulas similar to these: =SUM(Sheet1:Sheet5!X100) =SUM(Sheet1:Sheet5!X101) -- HTH, RD ============================================== Please keep all correspondence within the Group, so all may benefit! =======================...

How to seperate worksheets so each displays on different monitors
When I open two excel worksheets they open up in a excel window. I can't seperate them to view them on seperate monitors. I was able to view the worksheets in seperate windows on different monitors until lately. Not sure what I did to change the view. Open up a seperate session of XL. I.e., open first file, then open up another session of XL, and from there open the 2nd file. They should now be two seperate windows. -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "ValD2009" wrote: > When I open two excel worksheets they open ...

How can I use a worksheet to plot polar coordinates?
I am trying to use an Excel worksheet as the matrix for plotting polar coordinates. Is there a way that this can be done? Hi, Have a look at these web pages on the subject. http://www.oaltd.co.uk/Excel/SBXLPage.asp#Charting http://www.stfx.ca/people/bliengme/ExcelTips/Polar.htm http://www.andypope.info/charts/polarplot.htm Cheers Andy louradam wrote: > I am trying to use an Excel worksheet as the matrix for plotting polar > coordinates. Is there a way that this can be done? -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info ...

Modify a range name with vb
Hi I have a name define named "DropResource" and the range is A10:A20 If somebody add data to A21, A22 and A23, I would like the vb code that will extend the range to A23 so it become A10:A23 Same thing if someone delete data in A19 and A20, the range become A10:A18 I have try with a macro and put the active cell on A10 and go with Shift End Down but it doesn't work because macro return a fix R and C reference. I would like code that use XL(down) but I don't succeed Thanks for helping You don't need a macro - the name can define itself: Define ...

Accounts Missing in Reports > Customize > Accounts Tab <TJS Oviedo>
I'm trying to set up a new report and some of my newer accounts do not appear in the Customize > Accounts tab. The accounts are open (not marked closed) and I have the "Show Closed Accounts" box checked. What gives? I tried Quicken 05 and it mangled my data in transition. I think I'm going to Q06 a/o Jan 1, 2006, starting with a file for a new year. I used Quicken from 92 to 2003. It's got issues, too. At least the reports are much easier to use, save and work with. MS folks... are you listening? M06, I'm reading, is no improvement on bugs, performance and featu...

how can I keep a tab in place?
I have workbooks with multiple worksheets. I would like to keep the summary tab in a fixed (first) position so that the user can easily, quickly find it without using the l<, <, >, >l (arrow) tabs. I use hyperlinks to get from the summary tab to the other tabs, and I know I can hyperlink tab back... but I'd rather not use the hyperlinks too much. Tools - Protection - Protect workbook (for structure) Or, create a custom button/macro that navigates to the summary sheet. -- Best Regards, Luke M "missy8892" <missy8892@discussions.microsoft.com>...

Merging worksheets #2
I would like to merge the data on two worksheets, can I and how do I do that? -- Ajtorrence Have it all on one sheet? or add it together on a 3rd sheet? Please provide more info. :) ************ Anne Troy www.OfficeArticles.com "Ann" <Ann@discussions.microsoft.com> wrote in message news:81C2F7CF-ED32-4A6C-BE36-1512B18FDA5D@microsoft.com... >I would like to merge the data on two worksheets, can I and how do I do >that? > -- > Ajtorrence ...

Vendor Name on 1099s
The 1099 currently pulls the Vendor Check Name field. I want it to pull the Vendor Name field instead. Is there an easy way to do this? -- Aimee Crowe Christian Homes, Inc. Budgets & Reporting Accountant Aimee: The report that generates the 1099 form would need to be modified using Report Writer to pull the data from the Vendor Name field instead of the Vendor Check Name field. Frank Hamelly MCP-GP, MCT East Coast Dynamics www.eastcoast-dynamics.com I agree, but the vendor name field is not an option in the list of fields for this report. -- Aimee Crowe Christian Homes, Inc. B...

Can I open Corel Quattro Pro 12 Worksheets in Excel 2003 XP
Is there a way in which my colleagues can access my Corel Quattro Pro 12 Spreadsheets in Microsoft Excel? In QP, you can save your files in XLS format and you can open them with Qp while colleagues can open them with Excel. best wishes -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email "hristopher James" <hristopher James@discussions.microsoft.com> wrote in message news:C2932A64-30BA-4772-AC8D-29D1386658ED@microsoft.com... > Is there a way in which my colleagues can access my Corel Quattro Pro 12 > Spreadsheets in Microsoft Excel? ...

Tab Ctrl using buttons instead of tabs
Hi, I am using a tab control and have implemented buttons instead of the normal tabs. My problem is that, on the first button press, the button selected does not get depressed visually, but the act of pushing the button gets handled and the new dialog is displayed. This only happens on the first button press, subsequent presses are fine. It does not happen when buttons are replaced with tabs. Does anyone know how I can force the buttons to keep up t odate on the first press? TIA Tony Are you creating buttons as 'PushButtons'? How are you setting the initial state of the...

Reversing first and last names in column
An organization I volunteer for has a database setup in Excel. The column for the name is set up this way: Jones, Thomas T. Now they want to change it to Column A - Thomas T. and Column B - Jones. Is there a way to do this without retyping all the names. We're all pretty new to Excel and don't know were to begin. I'd really appreciate any help with this. Thanks. Helene Use data>text to columns, delimited select comma as delimiter, that will split them at the comma, then just select column A, right click and do cut, select column C, right click and do insert cut cells Or use ...

Comparing first and last names in two lists #5
I have two data sources that each contain about 8000 names in seperate fields for first and last name. I can put them on seperate worksheets or append one to the other. I need to make them match and find out where they don't. Messed with consolidate but not sure if that will work for more than one column at a time. FYI data set one is from a school transportation database and data set two is from the main student database from the same school district. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages dir...

Name is not associated with file
Just so that we can keep a running total of those affected by the latest Money Update, I also have been unable to log in either through the usual way or through the posted work arounds. Thanks to the MVPs that have to put up with the badmouthing, the majority of us know you do your best to help us keep things running smoothly. However, the company really is in a bad spot since their latest update has effectively crippled many of us that rely on the program to run our finances. And I fear that by trying to use our backups we will not be able to log in anyway and cause further problem...

Generating customer names in B by entering acct# in A #2
Thank you BenjieLop . . . that did it. bu -- budmc ----------------------------------------------------------------------- budmck's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1454 View this thread: http://www.excelforum.com/showthread.php?threadid=26186 budmck Wrote: > Thank you BenjieLop . . . that did it. > bud You're welcome ... glad I can help -- BenjieLo ----------------------------------------------------------------------- BenjieLop's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1101 View this thread: http...

formula in a worksheet
I am trying to count the no of rows that satisfy multiple conditions. I tried using COUNIF and SUMIF with no luck. If anyone could help, that would be appreciated. Here is an example of what I did: A B C D ------------------------------------------------ 1| StudentID Sex Age CollectionAmount 2| A Male 11 21 3| B Male 11 22 4| C Female 8 23 5| D Female 12 24 6| E Female 9 25 Formula to find the sum of "CollectionAmount" for Male Students of Age > 10 Provided cells used are A1:D6, the formul...

Select specific worksheets & copy
Hi All I've tried to write the following code to: - find worksheets in active workbook with "Planned" in cell A1, - then select all those worksheets and copy them into one new workbook - then format each sheet within the new workbook (e.g. select a named range & copy/paste values etc) The workbook and worksheet names are dynamic I'm sure I've got the "End If"'s / "Next" in the wrong place (this always confuses me) At the moment it copies the active worksheet (which does not have "Planned" in cell A1) and a blank new w...

Changing setup name in Microsoft Outlook email
I recently setup my Outlook email account (msn.com) and would like to change my name associated with the account. How can I do this. >-----Original Message----- >I recently setup my Outlook email account (msn.com) and would like to change >my name associated with the account. How can I do this. >. > More information would eliminate answers that are not applicable to your situation. Anyway, Outlook 2003 Help responded with this answer: Change an e-mail account name An e-mail account name is the name that appears in the list of e-mail accounts you have created. If you use ...