I've created an Excel macro, with the assistance of AI, to streamline room assignments for hotel staff.
My macro does the following: it reads room assignment instructions from the "Planning" workbook ("Programma" sheet),
handling various instructions like floor assignments (e.g., "IIP"), specific room numbers, and combinations.
It prioritizes specific room numbers over floor assignments. It cross-references with 'Occupancy' and 'Arrivals' workbooks,
checking the "Occupancy" workbook to determine which rooms should be marked as occupied or vacating next day based
on guest stay dates and fetching details from the "Arrivals" workbook for how rooms that are currently occupied should
be prepared when vacated next day(room number, bedding preference, guest count, estimated arrival time).
It updates maid worksheets within the "Planning" workbook, based on which maiden will be working,
assigning rooms to specific worksheets, marking rooms status based on dates from the "Occupancy" workbook,
and transferring arrival information.
It handles unassigned rooms by generating a list of rooms to alert the user before proceeding.
My macro is not correctly interpreting room assignment instructions from the designated
cell in the "Programma" sheet of the "Planning" workbook(not assigning any rooms)
nor is it marking the rooms status as occupied or to be vacated.
I need help debugging this part. Additionally, I'm having trouble handling all the variations in how room assignments can be
written (e.g., "IIIP DALLA 301 ALLA 313"). I'd appreciate guidance on optimizing the code that parses these instructions.
Also, the ETA from the "Arrivals" workbook is being written incorrectly to the maid worksheets.
The workbooks and macro for reference:
Planning.xls Arrivals.xls Occupancy.xls MACROPLANNING.txt
Bookmarks