A VBA macro is not required for the order list: use Microsoft 365 in-cell checkboxes plus VSTACK and FILTER to combine every checked row dynamically in Order Form!B11.
1. Standardize the inventory sheets
On each sheet from Office Supplies through Kitchen, use the same columns and row range, for example:
| Column |
Contents |
| A |
Checkbox |
| B |
Sim # |
| C |
Description |
| D |
Sold As |
| E |
Cost/Unit |
- Select the checkbox cells, such as
A2:A200.
- Select Insert > Checkbox.
- Repeat on each inventory sheet.
These in-cell checkboxes contain TRUE when checked and FALSE when unchecked, so formulas can use them directly.^1^
Your existing conditional-formatting rule can highlight each selected row. For example, apply this formula to A2:E200:
=$A2=TRUE
Formula-based conditional formatting must return TRUE or FALSE.^2^
Clear the intended output area below Order Form!B11; a dynamic-array formula needs empty cells in which to “spill” its results.
Enter this formula in Order Form!B11:
=LET(
items,VSTACK(
'Office Supplies'!B2:E200,Hygiene!B2:E200,Janitorial!B2:E200,
Linen!B2:E200,Officer!B2:E200,Resident!B2:E200,Kitchen!B2:E200),
picked,VSTACK(
'Office Supplies'!A2:A200,Hygiene!A2:A200,Janitorial!A2:A200,
Linen!A2:A200,Officer!A2:A200,Resident!A2:A200,Kitchen!A2:A200),
FILTER(items,picked=TRUE,"")
)
VSTACK appends the ranges vertically, and FILTER returns only rows whose checkbox is TRUE.^3^^4^
The result will:
- Start at
B11.
- Return Sim #, Description, Sold As, and Cost/Unit.
- Place each selected product on the next available line.
- Remove a product automatically when its box is unchecked.
- Close the gap automatically after an item is removed.
Adjust 2:200 to cover the actual inventory rows. All seven source sheets must use the same four-column structure. Do not type into the formula’s spill area; #SPILL! means a cell or merged range is blocking it.
If it is sufficient for the workbook to reopen on the last-used sheet, select Form, save, and close the workbook while that sheet is active.
To guarantee that Form is selected whenever the workbook opens, use this small desktop VBA event:
- Save the file as Excel Macro-Enabled Workbook (
.xlsm).
- Press Alt+F11.
- In Project Explorer, double-click ThisWorkbook.
- Paste:
Private Sub Workbook_Open()
Worksheets("Form").Activate
Range("A1").Select
End Sub
- Save, close, and reopen the workbook.
Workbook_Open runs when the workbook is opened.^5^
VBA cannot run in Excel for the web; open the workbook in the Windows desktop application for this startup behavior.^6^
If Sheet 1 only duplicates fields already held on Form, update any formulas that reference it and then delete it. If it contains linked cells, lookup data, or calculations used elsewhere, retain it and hide it instead.
For each sheet:
- Select the checkbox cells and any order-form cells users may edit.
- Press Ctrl+1 and select Protection.
- Clear Locked, then select OK.
- Leave
Order Form!B11 and its formula locked.
- Select Review > Protect Sheet.
- Permit Select unlocked cells and any other required actions.
- Optionally enter a password.
Worksheet protection takes effect only after editable cells are unlocked and Protect Sheet is enabled.^7^
If the current checkboxes are older Form controls rather than Insert > Checkbox cells, each control normally uses a linked cell. Unlock and hide those linked cells before protecting the worksheet.^8^
Worksheet protection prevents accidental editing; it is not file-level security. Also retain the password safely because Microsoft cannot retrieve a forgotten worksheet-protection password.
References
- Using check boxes in Excel | Microsoft Support
- [Windows](https://support.microsoft.com/excel/use-conditional-formatting-to-highlight-information-in-excel#use-a-formula-to-determine-which-cells-to-format)
- VSTACK function | Microsoft Support
- Lookup and reference functions (reference) | Microsoft Support
- Workbook.Open event (Excel)
- Excel for the web
- [Windows](https://support.microsoft.com/excel/protect-a-worksheet#enable-worksheet-protection)
- Protect controls and linked cells on a worksheet | Microsoft Support