+ Reply to Thread
Results 1 to 17 of 17

Populate monthly calendar with table

  1. #1
    Forum Contributor Marco-Kun's Avatar
    Join Date
    04-14-2009
    Location
    Holland
    MS-Off Ver
    Dutch:2007
    Posts
    298

    Populate monthly calendar with table

    Hello everyone,

    Attached is a file with, on the first sheet, an event table with dates.
    The second sheet has a calendar that I found on the web. You can select the month and year and the calendar changes accordingly.

    What I would like is to populate the calendar with the events and name of the corresponding person.

    Thanks in advance and kind regards,

    Marco
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Populate monthly calendar with table

    You will need to use INDEX and Match for this, i dont think you'll need VBA, think its possible with formula.

    I'll take a better look after the meeting i am in
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  3. #3
    Forum Contributor Marco-Kun's Avatar
    Join Date
    04-14-2009
    Location
    Holland
    MS-Off Ver
    Dutch:2007
    Posts
    298

    Re: Populate monthly calendar with table

    That would be great too, thank you!

  4. #4
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Populate monthly calendar with table

    Something like this, its an array formula so ctrl shift & enter , just playing in calendar E3

    =Events!$B$1 & " " & INDEX(Events!A3:A19,SMALL(IF(Events!$B$3:$B$19=Calendar!E2,ROW()-2),ROWS(Calendar!$E$3:E3)),1)

    I'll take a better look in about 15mins.

  5. #5
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Populate monthly calendar with table

    Hi

    Yes, it is possible with array formula, although doing it on your example it gets pretty cluttered, it would be something like this, but a lot longer

    Please Login or Register  to view this content.
    I think it would be best to give each date area a line per person, then we can just do a similar formula for each person.

    can they do more than 1 event on one day?

  6. #6
    Forum Contributor Marco-Kun's Avatar
    Join Date
    04-14-2009
    Location
    Holland
    MS-Off Ver
    Dutch:2007
    Posts
    298

    Re: Populate monthly calendar with table

    This indeed works for just that instance for Person 1.
    Thank you.

  7. #7
    Forum Contributor Marco-Kun's Avatar
    Join Date
    04-14-2009
    Location
    Holland
    MS-Off Ver
    Dutch:2007
    Posts
    298

    Re: Populate monthly calendar with table

    As for now, I do not think they can do more than 1 event on one day.
    Do you mean 1 line for each person in the calendar? The actual data has a lot more people than this example.

  8. #8
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Populate monthly calendar with table

    Ok, i think it will get a bit messy by formula then. The formula you tried is for 2 people change, person 1's date to 02/01/2014 and person 2's 2st date to 01/01/14 and it will show them.

    I'll do some vba

  9. #9
    Forum Contributor Marco-Kun's Avatar
    Join Date
    04-14-2009
    Location
    Holland
    MS-Off Ver
    Dutch:2007
    Posts
    298

    Re: Populate monthly calendar with table

    Okay thank you!

  10. #10
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Populate monthly calendar with table

    HI,

    This is my 1st draft, i'll test it a bit more for you

    Please Login or Register  to view this content.
    Last edited by nathansav; 08-07-2014 at 07:04 AM.

  11. #11
    Forum Contributor Marco-Kun's Avatar
    Join Date
    04-14-2009
    Location
    Holland
    MS-Off Ver
    Dutch:2007
    Posts
    298

    Re: Populate monthly calendar with table

    Thanks for the code. It seems that right now, whenever 2 people have an event on the same date, the function returns: "Person 1 Event 1Person 2 Event 2".

    Is it possible to have each row in the calendar only display one event?
    So in this case:
    Person 1 Event 1
    Person 2 Event 2

  12. #12
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Populate monthly calendar with table

    That was my original point, you have more peole to add, so it will be massive.

    "Do you mean 1 line for each person in the calendar? The actual data has a lot more people than this example"


    you only have 4 rows, so if all 8 people are doing a task on that day, you'd need 8...

  13. #13
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Populate monthly calendar with table

    you could merge the cells and add vbcrlf to this line

    strOutput = strOutput + strPerson & " " & wsData.Cells(intRowFound, 1) & vbcrlf

  14. #14
    Forum Contributor Marco-Kun's Avatar
    Join Date
    04-14-2009
    Location
    Holland
    MS-Off Ver
    Dutch:2007
    Posts
    298

    Re: Populate monthly calendar with table

    That's true, the calendar only has 4 rows right now, but that could be extended.
    I will see how your code works when it's done. I'm also kind of in the dark how many people can do something on the same day.
    The output of your code is great too, as long as it's possible to put the results below each other in that one cell.

  15. #15
    Forum Contributor Marco-Kun's Avatar
    Join Date
    04-14-2009
    Location
    Holland
    MS-Off Ver
    Dutch:2007
    Posts
    298

    Re: Populate monthly calendar with table

    That seems great, let me just test that out and I'll let you know how it works out! Thanks already for the help!

  16. #16
    Forum Contributor Marco-Kun's Avatar
    Join Date
    04-14-2009
    Location
    Holland
    MS-Off Ver
    Dutch:2007
    Posts
    298

    Re: Populate monthly calendar with table

    It works great, and overall it seems like it works like I want too, except for one thing.
    The function doesn't seem to update automatically. My workbook is set to automatically update formulas, but whenever I add a date to the list, it doesn't add it to the calendar unless I click on the formula and press Enter again. Might be on my end..?
    Quote Originally Posted by nathansav View Post
    you could merge the cells and add vbcrlf to this line
    strOutput = strOutput + strPerson & " " & wsData.Cells(intRowFound, 1) & vbcrlf

  17. #17
    Forum Contributor Marco-Kun's Avatar
    Join Date
    04-14-2009
    Location
    Holland
    MS-Off Ver
    Dutch:2007
    Posts
    298

    Re: Populate monthly calendar with table

    I fixed the problem I had above by adding this:
    Please Login or Register  to view this content.
    Also, it seems it is possible that someone has multiple events on one day. Is it possible to add that?
    Sometimes an event can last multiple days. Do you have any idea how to implement that?

    Thanks in advance and kind regards,

    Marco

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Auto Populate Calendar from Table Excel
    By Corocotan in forum Excel General
    Replies: 15
    Last Post: 12-10-2020, 02:13 AM
  2. Populate an Excel calendar template with events from a separate table
    By Dana_Carter in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-12-2014, 12:14 PM
  3. Replies: 3
    Last Post: 07-29-2014, 01:20 PM
  4. Auto Populate Calendar From Data Table
    By tommy_b in forum Excel General
    Replies: 2
    Last Post: 10-28-2013, 06:04 PM
  5. Modify Yearly Calendar to Monthly Calendar Excel 2000?
    By James Cooper in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 07-13-2006, 06:50 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1