Can I have a variable fed tab name?

G

Guest

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.
 
G

Guest

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.

(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top