Rather than typing out the function I am dealing with since it is rather long and arbitrary without the columns it is referencing, I have provided a simplified mock-up of my spreadsheet here. Be sure to make a copy of it and not edit the original directly. If I need to remove this link, I will.
Essentially, I am trying to take a schedule that another party has already created and display it in an hourly calendar view according to the VLOOKUP search key. In my example linked above, I have created a classroom schedule in the Master Schedule tab that includes the room(s), subject, teacher(s), and start and end times, as well as the date. I have rooms scheduled for the current day, as well as the day before since some of the end times from the previous day go past midnight, and therefore I would like to include them in the calendar view for the current day if they run into the early morning. In that same tab, I have a VLOOKUP formula with the room number as the search key. The reason the formula is so long is because I have to account for if there are multiple rooms separated by a comma "," or forward slash "/", and it was drawn from an solution offered to another Stack Overflow question of mine. It gets the job done, but if there is a method that is not as convoluted, I'm all ears.
I would like to translate the data in the Master Schedule tab into the calendar view in the Room Schedule tab. I thought I had it worked out logically with a few IF statements, but I have struggled mightily. I realize open-ended questions like these aren't always appreciated on this platform, yet I am at a loss for how to accomplish what I am going for, especially without having the formulas take a long time to populate the calendar any time there is an update to the master schedule, so any help or a nudge in the right direction is greatly appreciated. I'm happy to clarify anything if the spreadsheet I linked or my objective is not clear.