VBA & Macro Problems

Create an Excel Reservation Schedule with Date-Based Boat Availability

Muhammad TalhaMuhammad Talha Oct 10, 2026 871 views

Question details

The user needs to create a reservation workbook to manage boat availability based on specific date ranges, visualize occupied spaces, and filter data by selected dates.

Create an Excel Reservation Schedule with Date-Based Boat Availability
Product
Excel
Device & OS
not provided
Scenario
Managing reservations for a marina or hotel by assigning entities to spaces with set arrival and departure dates.
Observed behavior
The goal is to dynamically filter records and highlight occupied spaces based on a search date, though mapping this to a visual to-scale layout requires advanced time-based logic.
Before you start

Ensure your Excel workbook is saved as a Macro-Enabled Workbook (.xlsm) if you plan to use VBA scripts for advanced automated date filtering.

Solution 1Recommended

Build a Structured Reservation Table with Conditional Formatting

Use a standard Excel table combined with conditional formatting to track arrivals, departures, and visually highlight occupied spaces for a specific date.

This method avoids complex VBA programming by relying on built-in Excel functions to visually flag whether a boat is occupying a space on a specific date you define.

1
Create the Base Table

Set up your worksheet with columns for 'Boat Name', 'Space/Bay', 'Arrival Date', and 'Departure Date'. Enter your data into these columns and convert it into a structured table by pressing Ctrl + T.

2
Add a Selected Date Cell

Dedicate a specific cell at the top of your sheet (for example, F1) to act as your 'Search Date'. Enter the date you wish to check in this cell.

3
Apply Conditional Formatting

Select the data rows in your table. Go to the 'Home' tab, click 'Conditional Formatting', and select 'New Rule'. Choose 'Use a formula to determine which cells to format'.

4
Enter the Formula and Format

Input a formula like =AND($F$1>=$C2, $F$1<=$D2) assuming C is Arrival and D is Departure. Click 'Format', choose a fill color (e.g., Red for occupied), and click 'OK'.

Build a Structured Reservation Table with Conditional Formatting
Dynamic Updates: Whenever you change the date in cell F1, the conditional formatting will automatically update to highlight the boats occupying spaces on that exact day.
Manage Schedules Seamlessly

Create Your Reservation Schedule with WPS Spreadsheet

WPS Spreadsheet offers powerful structured tables, advanced conditional formatting, and full VBA (macro) support to easily build and manage complex reservation trackers.

  1. 1. Create a New Workbook: Open WPS Spreadsheet and create a blank workbook. Set up your data columns: Vessel Name, Space ID, Arrival, and Departure.
  2. 2. Set Up Conditional Formatting: Go to the 'Home' tab and click 'Conditional Formatting' to apply highlighting rules based on your target date cell.
  3. 3. Enable the Developer Tab: If you need VBA, go to the settings to enable the Developer tab, giving you full access to macro recording and editing capabilities.
  4. 4. Write Custom Filter Scripts: Use the built-in VBA Editor to write automated scripts that instantly filter and update your marina layout whenever dates change.
Fully compatible with Microsoft Excel (.xlsx and .xlsm) formats.Advanced conditional formatting to easily color-code available and occupied spaces.Built-in VBA macro support for automating date-based filtering and data entry.Free, lightweight, and easy to use for personal or small business management.
microsoft office alternative - wps office

Frequently Asked Questions

Can I account for exact arrival and departure times in the Excel schedule?

Yes, but you will need to format your columns to include both Date and Time (e.g., mm/dd/yyyy hh:mm) and adjust your conditional formatting formulas or VBA logic to compare time values, rather than just whole dates.

How can I create a visual, to-scale layout of the marina in Excel?

Creating a true to-scale layout natively in Excel cells is difficult. You can approximate it by adjusting row heights and column widths to form a grid map, then linking the cell colors on that grid to your reservation table using conditional formatting or VBA.

Why is my VBA macro not triggering when I change the date?

Ensure that macros are enabled in your Trust Center settings. Additionally, verify that your event code is placed in the specific Worksheet module (e.g., Sheet1) using the Worksheet_Change event, rather than inside a standard Module.