+ Reply to Thread
Results 1 to 13 of 13

Need Calendar to Populate from Schedule using multiple criteria

  1. #1
    Registered User
    Join Date
    03-06-2024
    Location
    CA
    MS-Off Ver
    Microsoft 365
    Posts
    6

    Need Calendar to Populate from Schedule using multiple criteria

    Hi there,

    If you look at the attached example, I need help auto-populating calendars with the information in the Schedule tab.

    There are two calendars in each classroom tab as the class can be either a 1 or 2 day session (Schedule Tab Column B). Leveraging the Schedule tab, I need the calendars to be able to block conditional format for the time slots.

    For example, in the schedule tab, line 2 and line 4, in the Room 110 tab, have calendar that is labeled "2 day class" be able to block off that time slot using column B from the Schedule tab. Therefore do the same for line 4, however would populate calendar labeled "1 day class".
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Need Calendar to Populate from Schedule using multiple criteria

    If the number of days in column B is not specified, do we assume it to be 1 day?

    If it is 2 day, then does this mean you want the next day to be highlighted, e.g. if the day is Wed and 2-day, do you want Wed and Thu highlighted in the 2 calendars?

    You should format columns F and H as General to see the correct hour.

    It would help to put the room number in each sheet, e.g. in cell A1 or I1.

    I would suggest having a helper column in the schedule sheet which will identify the room number, time-slot and whether 1- or 2- day.

    I'm about to go out now, but I'll check for your reply when I get back (several hours).

    Hope this helps.

    Pete

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: Need Calendar to Populate from Schedule using multiple criteria

    Further to Pete's comments:

    Please use consistent names for headers so in "Schedule" - Day of Week - use "Mon","Tue" as per the headings in the Room sheets.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: Need Calendar to Populate from Schedule using multiple criteria

    VBA offering

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by JohnTopley; 03-06-2024 at 10:17 AM.

  5. #5
    Registered User
    Join Date
    03-06-2024
    Location
    CA
    MS-Off Ver
    Microsoft 365
    Posts
    6

    Re: Need Calendar to Populate from Schedule using multiple criteria

    Pete,

    Column B requires input for either 1 or 2; I can add a drop-down.

    If it is a two-day class, then it only highlights the two-day calendar (The left calendar) in the respective room tab. So, looking at lines 2 and 3, the two-day calendar for room 110 would highlight time slots for 10:05 AM—11:00 AM on Monday and Wednesday (Schedule tab column A).
    So, line 4 for a one-day class would do the same but only populate the one-day calendar (the calendar on the right) in classroom tab 110.

    You mentioned helper columns in the schedule sheet, are you referring a combined helper column and not the separate columns already listed in the schedule tab?

    I appreciate your help on this.
    Last edited by RuPan; 03-06-2024 at 03:32 PM.

  6. #6
    Registered User
    Join Date
    03-06-2024
    Location
    CA
    MS-Off Ver
    Microsoft 365
    Posts
    6

    Re: Need Calendar to Populate from Schedule using multiple criteria

    John, The 1 and 2 are identifiers for which calendar it populates. It should only highlight the day and time slot pulled from the schedule. So, looking at line 2, the 2-day calendar in tab Room 110 should only highlight the Mon column for the time slot 10:05AM—11:00AM. I think your current macro is highlighting Mon and Tues assuming the 2 days?

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: Need Calendar to Populate from Schedule using multiple criteria

    Did you look at post #4? modified in light of your #5 post
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    03-06-2024
    Location
    CA
    MS-Off Ver
    Microsoft 365
    Posts
    6

    Re: Need Calendar to Populate from Schedule using multiple criteria

    When I update the schedule and click run, the calendars don't update.

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: Need Calendar to Populate from Schedule using multiple criteria

    Please Login or Register  to view this content.
    Added code to clear each Room sheet and do a complete refresh when macro is run: caters for any changes to the schedule.

    Data sorted by Room Number.
    Attached Files Attached Files
    Last edited by JohnTopley; 03-07-2024 at 08:22 AM.

  10. #10
    Registered User
    Join Date
    03-06-2024
    Location
    CA
    MS-Off Ver
    Microsoft 365
    Posts
    6

    Re: Need Calendar to Populate from Schedule using multiple criteria

    I am able to run the Macro, thank you.

    Is there any way that the calendar's can be updated to the minute level? ex: entering 9:00AM to 12:15PM and having the calendar populate that time slot to the minute versus just the hour?
    Last edited by RuPan; 03-08-2024 at 01:56 AM.

  11. #11
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: Need Calendar to Populate from Schedule using multiple criteria

    Amended to record to your 15 minute slots

    Please Login or Register  to view this content.
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    03-06-2024
    Location
    CA
    MS-Off Ver
    Microsoft 365
    Posts
    6

    Re: Need Calendar to Populate from Schedule using multiple criteria

    One last ask and this will be the perfect template: Can you stop the Schedule tab from re-sorting every time I hit the macro button?

  13. #13
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: Need Calendar to Populate from Schedule using multiple criteria

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by JohnTopley; 03-09-2024 at 07:27 AM.

+ 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. Replies: 0
    Last Post: 04-06-2023, 06:01 PM
  2. How to schedule refresh for next/prev week in a calendar work schedule
    By sbatabyal in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-05-2021, 12:02 AM
  3. Replies: 1
    Last Post: 03-09-2016, 06:39 AM
  4. Need formula to populate a schedule based on multi criteria! PLEASE!
    By kara051678 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-13-2015, 02:42 AM
  5. Need help with auto-populate list schedule details to calendar, please.
    By aghamilton327 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-19-2014, 03:20 PM
  6. Replies: 2
    Last Post: 04-13-2012, 01:16 PM
  7. Auto Populate Training Schedule in Calendar
    By Wessmaster in forum Excel General
    Replies: 2
    Last Post: 02-06-2012, 12:40 PM

Tags for this Thread

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