Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA - Adding items to pre-made calendar 1

Status
Not open for further replies.

Groves22

Technical User
Jan 29, 2009
102
US
Hello...
I have a document that has 13 tabs; Names, Jan thru Dec. The name tab looks like:

Name Dates in Jan Dates in Feb etc.
John Doe 1,2,3 1,15
Jane Doe 15,16,17

And the Jan thru Dec tabs have blank calendars with dates in them. Each day is made up of 2 columns and 2 rows. 1 row and 1 column are small, and make the upper right box that houses the dat (much like a normal calender).

What I'm trying to get, is if a person has the day in the Names tab, I want their name to appear on it's calendar for that date.

Is something like that possible? If so, can someone offer some tips/help?
 



Is this workbook something you are stuck with, or is it your design?

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 



Then you have the power to do it right.

Your design is not at all conducive to the features of Excel. Excel works best with normalized table structures.
[tt]
ClientDatesTable
CliName CliDate
John Doe 1/5/2010
John Doe 1/7/2010
John Doe 1/15/2010
Jane Doe......etc
[/tt]
Then a simple Pivot Table report will give you what you want to have on the other 12 sheets.

If your data were structure like this, you could get a NON VBA solution less than a minute!

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Hey Skip...

I guess I could have been a little more clear. Yes, I created the calendar's but the 'Names' sheet is not mine to adjust. It is a file from my dad's work, and they need to see it in the calendar format.

I told him I will see what I can do, but if I can't figure it out, he was OK with filling in the names by hand for each month. He was just wondering if I could somewhat automate for him

If it's something you think is not easily done with VBA, then I will let him know. He'll just have to deal! =)
 



Ok, on the NAMES sheet, loop thru all and use the Split function to parse the day values.

You'll also have to parse the Dates in mmm to get the mmm.

Then it's just a matter of doing a lookup to find the day in the month.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Hey Skip...

Thanks for the bump in the right direction. If I run into any problems, I'll post.

Thanks,
Josh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top