VBA & Macro Problems

How to Prevent Duplicate Team Selection in Excel UserForm Combo Boxes

Anum MushtaqAnum Mushtaq Nov 10, 2026 869 views

Question details

The user needs to build an Excel VBA UserForm where selecting a team in one combo box removes that team from the options in all other combo boxes to prevent duplicates.

How to Prevent Duplicate Team Selection in Excel UserForm Combo Boxes
Product
Excel
Device & OS
not provided
Scenario
Creating a playoff bracket using an Excel VBA UserForm with dynamically updating controls.
Observed behavior
Teams selected in one combo box should dynamically disappear from the remaining combo boxes, ensuring each team can only be selected once across the form.
Before you start

Ensure that the Developer tab is enabled in your Excel ribbon and that you have saved a backup copy of your workbook before editing VBA code.

Solution 1Recommended

Dynamically Rebuild Combo Box Lists via VBA Change Events

Use VBA to refresh the available options in your combo boxes every time a selection is made, filtering out already chosen teams.

This approach stores the master list of teams on a dedicated worksheet. When a user selects a team, the Change event triggers a macro that checks all combo boxes, records the selected values, and repopulates the unselected combo boxes with the remaining teams.

1
Prepare your Worksheet

Create a new worksheet named 'Teams Info'. List all your available teams in a single column (for example, Column A) to act as the master list for the UserForm.

2
Initialize the UserForm

Open the VBA Editor by pressing Alt + F11. Double-click your UserForm in the Project Explorer, right-click the form, and select 'View Code'. Add code to the UserForm_Initialize event to load the complete team list from the 'Teams Info' sheet into all combo boxes.

3
Add Change Events to Combo Boxes

In the UserForm design view, double-click each combo box to generate a _Change() event in the code editor. Inside each event, add a line to call a custom sub-routine, for example, Call UpdateComboBoxes.

4
Write the Update Logic

Create the UpdateComboBoxes sub-routine. Write a loop that iterates through all combo boxes to collect selected values into a collection or array. Then, clear the items of any unselected combo boxes and reload them from the 'Teams Info' sheet, using an If statement to skip any names that match the collected selections.

Separate AFC and NFC Teams: If you are building an NFL playoff bracket, consider using two separate master lists and running distinct update routines for AFC and NFC combo boxes to maintain accurate bracket formatting.
Advanced Macros with WPS Office

Build Dynamic UserForms with WPS Spreadsheet

WPS Office offers robust VBA macro support, allowing you to create complex UserForms, dynamic combo boxes, and interactive playoff brackets natively without modifying your original code.

  1. 1. Enable the Developer Tab: Open WPS Spreadsheet, go to Menu > Options > Customize Ribbon, and check the box for Developer to enable advanced macro tools.
  2. 2. Launch the VBA Editor: Click the Developer tab and select 'Visual Basic Editor' to open the macro programming interface.
  3. 3. Create your UserForm: Go to Insert > UserForm. Drag and drop your Combo Box controls from the toolbox onto the form to build your playoff bracket.
  4. 4. Add Your Code: Right-click your UserForm, select 'View Code', and paste your dynamic filtering logic. Run the macro to see your combo boxes update perfectly.
Fully compatible with Microsoft Excel VBA syntax and UserForm controlsEasily handle dynamic combo box filtering and Change eventsFree and lightweight alternative with a highly familiar ribbon interfaceSeamless migration for macro-enabled workbooks (.xlsm)
microsoft office alternative - wps office

Frequently Asked Questions

Why is the combo box list not updating when I make a selection?

Ensure that your _Change event for the combo box is correctly hooked up in the VBA editor and that your update subroutine is explicitly called inside the event handler.

Can I use named ranges instead of a worksheet column for the team list?

Yes, you can define a Named Range in your Excel worksheet and iterate through it in your VBA UserForm_Initialize code to populate the combo boxes.

How do I clear the selections and reset the bracket?

Create a 'Reset' CommandButton on your UserForm. In its click event, set the Value or ListIndex of all combo boxes to null or -1, and then run the macro to reload the initial master list into every box.

Does WPS Office support Excel UserForms?

Yes, WPS Office Pro and select free versions include full VBA support, allowing you to import and run Excel workbooks (.xlsm) containing UserForms without requiring any code modifications.