Forum Discussion
Automatically updating "Calendar" when new data is added?
- Jul 26, 2024
Hello aj1152,
VBA should do it, I've provided the file on the attachment, the code will reflect the person's checked in and out on the database into the Calendar View sheet, and handles overlaps by creating unique room identifiers and highlight assignments in light green and yellow if the same building and room number has two or more person accomodating it.
Provided an "Autopopulate" button to run the macro.
online sql:
create temp table aa as
select split_num(regexp2('^\d+',`Check-in`)||'-'||regexp2('^\d+',`Checkout`)) day,regexp2('\D+$',`Check-in`) surfix,* from RoomArrange limit 20;
cli_split_data~aa~,~day;
create temp table bb as
select Building,Room,day||surfix day2, group_concat(Person||`Student ID`) stu from aasplit group by Building,Room,day2 order by day2 COLLATE NATURAL_CMP;
//select * from bb;
cli_create_two_dim_no_order~bb~day2~stu;
select * from bb_two_dim;