Given the formula you're using for your named range, it looks like you're correctly setting up the range to dynamically adjust based on the number of non-blank entries in column AC from rows 21 to 34. Your formula =$AC$21:INDEX($AC$21:$AC$34,COUNTIF($AC$21:$AC$34,"?*")) is designed to create a range that starts at $AC$21 and ends at the last non-empty cell within $AC$21:$AC$34. This should indeed capture all entries if they match the criteria.
If your combo box still shows only 3 entries despite there being 5 in the output of your named range, here are a few things to re-examine or try:
1. Check the Combo Box Properties Again
- Drop Down Lines: Revisit the properties of the combo box (for Form Controls, right-click > Format Control; for ActiveX, right-click > Properties). Specifically, look for a property that controls how many lines are visible in the drop-down list without scrolling. For Form Controls, this setting is called "Drop-down lines". Increase this number to see if it allows more entries to display.
- ListFillRange: Double-check that the named range being used as the List Fill Range is correctly referring to your dynamic formula. It’s easy to accidentally reference a static range or an outdated named range.
2. Named Range Evaluation
- Evaluate Named Range: Go to the Formulas tab, use the Name Manager to find your named range, and ensure it correctly evaluates to the expected range. Sometimes, the named range doesn't update as expected.
- Dynamic Array Support: Depending on your Excel version, the dynamic array behavior (spilling) might not work as intended, or
INDEX might behave differently. Verify that your Excel version fully supports dynamic arrays if you're using a newer function or feature to define the range.
3. Refresh the Control
Sometimes, controls don't update immediately to reflect changes in their data source.
- Rebind Range: Try removing and then re-adding the named range in the combo box's List Fill Range property.
- Recreate Control: As a more drastic step, try deleting the combo box and creating a new one, then binding it to the named range again.
4. Excel Quirks
- Calculation Mode: Ensure Excel is set to Automatic calculation (Formulas tab > Calculation Options > Automatic). If it’s set to manual, the named range might not be updating as expected.
- Data Types: Make sure that all the cells within your range are consistent in their data types and there's no inadvertent error or non-compatible value that might be causing Excel to misinterpret the range.
5. Expand the Named Range Scope Temporarily
As a test, try expanding your named range or modifying the formula slightly to bypass potential edge-case scenarios in counting or indexing. For example, temporarily extend the range to a few more rows to see if the issue persists.
If, after trying these steps, the problem persists, consider the possibility of external factors such as Excel bugs, or explore alternative methods to achieve your desired result, including using VBA to populate the combo box if you're comfortable with macros.