Put Active Worksheet's Name in a Cell #3

Is there a way to put the active worksheet's name in the cell?  Not the
file name of the whole workbook, just the name of the currently
selected sheet.

Thanks for your help.

1/6/2006 6:42:53 PM
excel 39879 articles. 2 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 31

Hi Corey,

There are a few ways this can be done using either macros or functions, 
here's one of each:

(sourced from Chip Pearson's site, http://www.cpearson.com/excel/excelF.htm)
I recommend checking this page out as it also shows other possibilities.

*Sub InsertSheetNames()
Application.ScreenUpdating = False
Dim S As Worksheet
For Each S In ActiveWorkbook.Worksheets
S.Range("a1").Value = S.Name
Next S
Application.ScreenUpdating = True
End Sub
(sourced from ?, this can be inserted in a module & run as required to put 
the respective sheet name in cell A1 of every sheet or adapted & put in the 
"this workbook" section to run when the file is opened.)


Rob Brockett

"coreymartin@gmail.com" wrote:

> Is there a way to put the active worksheet's name in the cell?  Not the
> file name of the whole workbook, just the name of the currently
> selected sheet.
> Thanks for your help.
Rob3660 (422)
1/7/2006 10:53:02 AM

Similar Artilces:

I AM TRYING TO ENTER A NUMBER THAT BEGINS WITH ZERO'S AFTER I ENTER IT THE ZERO'S DISAPPEAR, HOW DO I KEEP THEM IN Please turn off the CAPS Lock, more than two lines would be extremely difficult to read. Reading caps is annoying. Format the column as text, if the leading zero is important to you then it is an identification not a number. The default alignment for text is left aligned which is also better for most identification "numbers". Credit card numbers are 16 digits, are identification and can not be entered as numbers, ever, because Excel only retains 15 si...

Tables #3
Does anyone know what the ESI_Location_XREF table is or what product it is associated with? Sue, The ESI_Location_XREF table (ESI Location Cross-Reference, dbo.ESI40300) is a part of vSync's EDI for Dynamics -- the SOP portion. You can find more information about vSync's products at http://www.vsync.com Best regards, -- MG.- Mariano Gomez, MIS, MCP, PMP Maximum Global Business, LLC http://www.maximumglobalbusiness.com The Dynamics GP Blogster at http://dynamicsgpblogster.blogspot.com "Sue" wrote: > Does anyone know what the ESI_Location_XREF table is or what p...

Restricting activation of a form button
I'm using 2 form buttons which runs 2 different subs. The buttons are on the same sheet. I wish to restrict the activation of one of the 2 buttons (assigned to the sub below) to only authorised persons via say, a password prompt? which appears upon clicking the button. Grateful for an example or two of how this control could be done. Thanks Sub TestReset() Sheet8.Select Range("D10").Value = Range("G15").Value Range("D11").Value = Range("D15").Value End Sub I would try something like this: Sub TestRest() Sheet8.Select Dim...

Worksheet Protection
We have a workbook that is password protected. The person who developed the password has forgotten it. Is there a way to by-pass the protection of the workbook? -- HuntRBW ------------------------------------------------------------------------ HuntRBW's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=29794 View this thread: http://www.excelforum.com/showthread.php?threadid=494979 http://www.mcgimpsey.com/excel/removepwords.html -- Kind regards, Niek Otten "HuntRBW" <HuntRBW.20csbm_1135106700.7207@excelforum-nospam.com> wrote in message ...

Relative references to named range
On behalf of my newphew, I received this query: "Quick one - I have a spreadsheet with very long formulas that reference a whole lot of variables in the same column. I tried naming the cells so that writing of the formula is easier to do. However, I need to copy the column across for other entities of varying nature, and these copied cells refer to the same named cell. Can I name a cell and copy it sideways so that it retains some sort of name with allusion to the column that it is in? Andrew van Gruting" I have tried copying a formula with a named range and, as expected, it maint...

Can you put white space outside a textbox?
When I put pictures in my publisher file, sometimes I want captions for the pictures. So I make a tiny textbox that I put under the picture, and type in a caption into that textbox. The problem is that I can make the picture have some space to left and right of it so that text doesn't crowd into the picture, but I can't do that with the textbox containing the caption. Is there any way to prevent outside text from crowding the borders of a textbox? You can move that textbox wherever you need. You don't need to leave space inside when you can steer clear of the textbox itself. ...

How do I reference values from 200 worksheets onto a summary sheet
I'm using Excel 2003. I have a workbook with over 200 worksheets. (Each tab named for an individual in a group.) I'm trying to set up a summary sheet which needs total values from each of the individual worksheets. I'm using a macro which creates a Table of Contents, then sorts the sheets and the list, providing a link to each sheet. I expect new names to be added so the macro will have to be rerun occasionally. A separate macro places the sheet name in cell A1 of each sheet in case that can be of any use. Is there a way to get the total values from each sheet onto th...

Where to put SQL statements in VC++ Application
I am wondering if putting all my SQL statements in the string table is a good idea. Is there a better place to store these statements?? Thanks in advance for any responses. Dominic Inline in the code, they arnt particually helpful to put in the string table. -- - Mark Randall http://zetech.swehli.com "Those people that think they know everything are a great annoyance to those of us who do" Isaac Asimov <dominicgualtieri@hotmail.com> wrote in message news:1129050897.519688.176820@g49g2000cwa.googlegroups.com... >I am wondering if putting all my SQL statements in...

Adding User Name to footer
I have spreadsheets that go out to a number of users, and they make various changes and print out for themselves. The problems is that no-one knows which version to pick up from a central printer. Can I add the user name to the footer. I also have the path and file in the same area. I would like to end up with : User Name printed 'path/file' on 'date' ...

Opening worksheets takes ages
WinXP pro & OfficeXP pro Without any changes to both system and hardware Excel needs ages to open files. I can see 'requesting virus scan' in the status bar and from then loading even the smallest worksheets take around 20 seconds. Anyone on reason and workaround? Tnx Edwin Maybe you should take a look at your anti virus program instead.. -- Regards, Peo Sjoblom "Edwin Niemoller" <laagveen@planet.nl> wrote in message news:btmt4n$5ts$1@reader10.wxs.nl... > WinXP pro & OfficeXP pro > > Without any changes to both system and hardware Excel n...

USB device name
How can we query the USB Device name that is assigned interactively by users(e.g. any arbitrary name assigned by them,using 'rename' option through GUI) ? PRANAV KANT GAUR <PRANAVKANTGAUR@discussions.microsoft.com> wrote: > >How can we query the USB Device name that is assigned interactively by >users(e.g. any arbitrary name assigned by them,using 'rename' option through >GUI) ? In which GUI is one able to assign an arbitrary name to a USB device? -- Tim Roberts, timr@probo.com Providenza & Boekelheide, Inc. "Tim Roberts"...

deleting cell with 0
How do I set a macro to delete all 0's in a selected range or is there a function to do this? Thanks in advance for your replies. Aloysicus Assuming the range is column A, this will do it Dim cLastRow As Long Dim i As Long cLastRow = Cells(Rows.Count, "A").End(xlUp).Row For i = cLastRow To 1 Step -1 If Cells(i, "A").Value = 0 Then Cells(i, "A").EntireRow.Delete End If Next i -- HTH RP (remove nothere from the email address if mailing direct) "Aloysicus" <aloy33@singnet.com.sg> wrote in mes...

Embedded Excel 2007 worksheets in CorelDraw
Hi, When I edit an embedded worksheet in CorelDraw (X3 and X4) with Excel 2007, once I'm finished and close the worksheet it becomes a colid black box. This occurs with worksheets embedded with Excel 2003 and with newly created worksheets with Excel 2007. Anyone know why this is and how to fix it? Thanks! -Leigh Clow ...

Business Portal 3
We have an issue with business portal where the response is really slow. A look in Event Viewer on the server shows the app domain is continually getting recycled. It also sometimes shows thread exceptions prior to recycling. Is there some log that would show what process caused the failure or anyone have any suggestions. Mystified, Thanks for using the newsgroups. I have a few questions regarding your issue. 1. Have you checked the settings on your app pool identity? How often the app pool recycles is set there. 2. Is the app pool for your BP site running multiple sites? ...

Due Activity
I want to make a workflow process that will do the following. 1 Someone creates a new contract with a contract template. 2 When the contract is Active then automatically a workflow proces which creates a activity. Only I want to put that activity on the first coming friday and not Due to so many days. is this possible? or is there some work arround to get this fixed? thanks in advance Not with the default functionality. If you need to so this you will need to develop a PostURL funtion to create the activity. Matt Parks MVP - Microsoft CRM ---------------------------------------- -...

Colour code worksheet tabs
Is there anyway to colour code worksheet tabs within an excel workbook? Only with Excel 2002 and later versions. Right click sheet tab. -- Don Guillett SalesAid Software donaldb@281.com "Al" <anonymous@discussions.microsoft.com> wrote in message news:2745e01c462bc$45cec910$a301280a@phx.gbl... > Is there anyway to colour code worksheet tabs within an > excel workbook? Only Excel 2002 or later. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Al" <anonymous@discus...

Linking worksheets, rearranging rows.
I have two worksheets (let's call them a & b). They are identical with around 1000 rows. I want to link the cells in worksheet 'b' to worksheet 'a' so data changed in worksheet 'a' will show in worksheet 'b'. However I need to rearrange the rows in worksheet 'a' to be alphabetical and worksheet 'b' will remain. What do I have to do to make sure the two worksheets are linked to the correct cell once worksheet 'a' is rearranged? I hope this makes sense Make your links absolute =SheetA!$A$1 Gord Dibbe...

Replaced motherboard due to hardware failure, it's not identical. Repair installation of Windows XP completed but now stuck in Logon-Activation loop.
Dear Group, An ASUS motherboard failed in a Win XP Pro pc belonging to a friend of mine, so I have replace it for her. Asus no longer make this mobo, it's not available so I bought a board from ASrock with the same socket, however the ASUS board had NVidia chipset while the ASRock uses AMD chipset. It's socket 939 and these are hard to come by now. Windows XP repair installation has been completed, it starts normally and offers logon to the pc or the domain controller. I select the pc and after a couple of seconds a Windows Product Activation message appears: "...

Put app and icon in task bar?
I have an MFC application that I want to be able to put in the task bar as a small icon and have it pop up the dialog when selected from the task bar. This app is intended to be run from the start up menu and be minimized in the task bar along with all the other start items... Pointers on how to please... By default app goes on the task bar. Do you mean system tray (that by default appears on the bottom right of the screen)? -- Ajay Kalra [MVP - VC++] ajaykalra@yahoo.com "ShipHead" <GoAway@SpamBoy.com> wrote in message news:#g1K8UgEFHA.2700@TK2MSFTNGP14.phx.gbl... > I...

first time linking worksheets need some info and help
I'm trying to link 4 cells with dates in them to be inputted into the second sheet for calculation. BUT the info is in a cycle. So basically I need it to link and stay. But when I do the next cycle, I need the info to change. I do have a column that is counting the cycles. So can I make it so it'll link the info until the cycle number changes? (a Formula???) if so how do i put a link and formula together. Also if this is figured out,can you possibly link a cell to two different worksheets within a workbook? Thank You Bryan Bloom Hi, Can you give an example as to what you are...

rename category names
I have the data in the below format vendor amount a 100 b 200 c 300 d 400 Now in the chart i want the category names as a,b,other(c,d should appear as other). Total amount of c and d should show up for other. Can you please suggest how this is possible. Hi, The chart will not summarise or group your data. You do that on the worksheet using formula then plot the new summarised data. Cheers Andy -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info "rename category names" <rename category names@discu...

Hello, I have the following VBA Macro: fname = Application.GetOpenFilename Workbooks.Open filename:=fname fname = Application.GetOpenFilename Set wb = Workbooks.Open(filename:=fname) fname has 12 worksheets. It is possible to activate any of them with an inputbox ? Thanks, One way: Const sPROMPT As String = "Which Sheet (% max)?" Dim wb As Workbook Dim vResult As Variant Dim nMax As Long Dim fname As String fname = Application.GetOpenFilename Workbooks.Open Filename:=fname fname = Application.GetOpenFilename Set wb = Workbooks.Open(Filename:=f...

click on checkbox copy to active cell
Is there any way to click on a checkbox beside a row of information and copy that row of data to an active cell? Maybe. If your active cell is in column A, you can copy that whole row to the activecell's row. If you use a checkbox from the forms toolbar, you can add as many as you want to the worksheet. But assign each of them the same common macro: Option Explicit Sub testme01() Dim myCBX As CheckBox Dim myCopyObjectsWithCells As Boolean Set myCBX = ActiveSheet.CheckBoxes(Application.Caller) If myCBX.Value = xlOn Then If myCBX.TopLeftCell.Row = Ac...

time and date set correctly, office says no, can't activate
can't activate office one note, computer tells me time and date are set incorrectly, this is not the case I haven't seen that one before. Can you use the "Activate over Telephone" link and call the number provided for an activation key? -- -Ben- Ben M. Schorr, MVP Roland Schorr & Tower http://www.rolandschorr.com http://www.officeforlawyers.com/outlook.html Author: The Lawyer's Guide to Microsoft Outlook 2007: http://tinyurl.com/ol4law-amazon "tottenham hotspur" <tottenham hotspur@discussions.microsoft.com> wrote in message news...

print worksheet without ABC and 123 labels showing?
I am trying to print out my worksheet without the column labels (A, B, etc) and row labels (1,2,etc) showing. I don't want to delete them - they are need for calculations in the worksheet. I am using Excel from Microsoft Office Home and Student 2007. These are called Row and Column Headings In XL2007 open the Page Setup tab on Ribbon and look for the Sheet Options Group (last but one on right). There are checkboxes for both Gridlines and Headings for both View (worksheet) and Print; Uncheck the box under Heading next to Print. In XL2003: File | Page SetUp ; open Sheet tab; unche...