sort and filter for userform listbox

Martel

New Member
Joined
Jun 19, 2019
Messages
26
I am sorting worksheet by 2 columns alphabetically then filtering by a 3rd which is required to be “Yes”. Works fine on worksheet but list box on user form returns all records regardless of 3rd column - could be blank or ‘No’. Userform containing List box is based on sorted and filtered worksheet. What could I be doing wrong. Help please
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Hi Martel,

are you using VBA to populate your listbox? Or are you just setting the range?
As far as I know that last one won't work.

If you are not using VBA at all, I suggest to use an advanced filter. Here the output can be sent to a separate range, which can then be used as input for the listbox.

If you are using VBA anyhow, then you add the items to the listbox one looping through the filtered table and using the
<code>.Range("D7:D46").SpecialCells(xlCellTypeVisible)
property. Do a search on google on : listbox from filtered list
</code>
 
Upvote 0

Forum statistics

Threads
1,214,954
Messages
6,122,462
Members
449,085
Latest member
ExcelError

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top