Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Can I have a variable fed tab name?
I have a time tracking workbook, with 20 time tracking spreadsheets. One for
each employee. I am using a sheet tab naming convention of (week ending date-Lastname) i.e. WE-DEC-30-Smith. Can I create a variable for week ending date that I can feed to the tab name from a list of names I have in an admistrative worksheet at the beginning of the workbook? Otherwise, I have to manually rename each of the 20 tabs for every week. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Can I have a variable fed tab name?
Dear Danny:
I haven't seen anyone answer your post yet and I'll tell you right off I'm not good enough with VBA to write what you want. But let me see if I can help you get an answer to your questions. You wrote a CAN I question and the answer is YES. You can control the sheet names using VBA. If you were to record a macro for it you'd end up with something like Sheets("Sheet1").Select Sheets("Sheet1").Name = "Dog"\ This is the basic format of what you're trying to do. What I can do for you from here is point you in the right direction. First off you'll need a macro to identify what part of the sheet name you're going to want to change. --Search the forum/google on this topic or post a question to the Excel Programmers forum Next you'll need to specify what text it gets changed to. That's easy enough. Have it reference a cell that you put the data into. So your next question would be how to you rename PART of a tabname with the value of a cell? -- Do another search in the forum(s) for this one or post a new specific question Lastly remember that your 'dates' are going to need to be TEXT for the macro to work. Excel will read the serial number date value irregarless of how you have the date formatted. You may need to lookup a way to convert a date to text only or you'll have to manually enter the TEXT version of the date. I hope this helped. It breaks up you're project into manageable areas that others (who are more capable) will be able to help you with. Good Luck!!! If I knew how to write it for you I would. But I'm still learning. "Danny" wrote: I have a time tracking workbook, with 20 time tracking spreadsheets. One for each employee. I am using a sheet tab naming convention of (week ending date-Lastname) i.e. WE-DEC-30-Smith. Can I create a variable for week ending date that I can feed to the tab name from a list of names I have in an admistrative worksheet at the beginning of the workbook? Otherwise, I have to manually rename each of the 20 tabs for every week. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
object variable or with block variable not set | Excel Discussion (Misc queries) | |||
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? | Excel Worksheet Functions | |||
make a vlookup using a variable path | Excel Worksheet Functions | |||
I Need VBA Assistance for global variable question | Excel Discussion (Misc queries) | |||
change function variable prompts?? | Excel Worksheet Functions |