Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting a worksheet tab name into a cell
I have a workbook with several worksheet tabs that have individual names on
them. I need to take the name and put it going down a column inside the worksheet of that name for varying number of rows and I need to do this for each worksheet. Example: Workbook A has sheets named Lynn Bales, Joe Brown, Daphne Anderson In worksheet Lynn Bales, I want the text "Lynn Bales" to go into column D to the end of the rowed data. Then I want to do the same for Joe Brown's worksheet and Daphne Anderson's worksheet. Is this feasible? Thank you in advance! Lynn |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting a worksheet tab name into a cell
In a standard code module (the same kind you get when you record a macro) you
can add the following function. Public Function TabName() As String Application.Volatile TabName = Application.Caller.Worksheet.Name End Function This function can be used in a cell in a spreadsheet. For example on the Lynn Bales sheet in the cells of column D add =TabName() If the name of the sheet changes then this formula will automatically update the next the the sheet is calculated. -- HTH... Jim Thomlinson "Lynn Bales" wrote: I have a workbook with several worksheet tabs that have individual names on them. I need to take the name and put it going down a column inside the worksheet of that name for varying number of rows and I need to do this for each worksheet. Example: Workbook A has sheets named Lynn Bales, Joe Brown, Daphne Anderson In worksheet Lynn Bales, I want the text "Lynn Bales" to go into column D to the end of the rowed data. Then I want to do the same for Joe Brown's worksheet and Daphne Anderson's worksheet. Is this feasible? Thank you in advance! Lynn |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Inserting comment in unlocked cell of protected Excel worksheet? | Excel Worksheet Functions | |||
Inserting a new Worksheet | Excel Discussion (Misc queries) | |||
Inserting New Worksheet | Excel Discussion (Misc queries) | |||
Inserting row in 1 worksheet and updating a different row in another worksheet | Excel Discussion (Misc queries) | |||
Inserting new worksheet | Excel Programming |