combobox

johny

Board Regular
Joined
Jul 15, 2002
Messages
69
I figured out how to filter my list
and not show all rows that arent
meeting the criteria.
I trying to set up a dropdown combo box
from the control box to show the Visible rows
ONLY and not all How do I set this up.
My list Fill Range is A700:a808 and it shows
all rows but some row are "0' and still showing the name. thanks john
Oh ya How do you delete a Question from message board.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
If your message hasn't been responded to, click on EDIT and DELETE THIS POST at the bottom. Then SUBMIT.

I also had the problem with the zeros. I resolved it for now by entering a formula and copying it throughout my range. In your case, I would copy it from A700:A808.

Try

=If(A700="","",A700)

This will eliminate the zero and leave it blank.
 
Upvote 0
Howdy Johny. Filling a combobox is very similar to filling a listbox, the following code will stack a listbox with visible cell values (no duplicates):<pre>
Private Sub UserForm_Initialize()
Dim cl As Range, spccl As Range, i As Integer
Dim cnt As Integer, z As String
Me.ListBox1.Clear
Set spccl = _
Sheets(CurrentsheetName).[c1:c100].SpecialCells(xlCellTypeVisible)
For Each cl In spccl
cnt = 0
If cl.Value<> "" Then
For i = 0 To ListBox1.ListCount - 1
z = Me.ListBox1.List(i)
If z = cl.Value Then cnt = cnt + 1
Next i
If cnt = 0 Then Me.ListBox1.AddItem cl.Value
End If
Next cl
End Sub</pre>

Just need to substitute the name of your combobox with listbox1. Not sure if you wanted a programmatic answer or not....

_________________
Cheers,<font size=+2><font color="red"> Nate<font color="blue"> Oliver</font></font></font>
This message was edited by NateO on 2002-08-31 19:38
 
Upvote 0

Forum statistics

Threads
1,214,970
Messages
6,122,514
Members
449,088
Latest member
RandomExceller01

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