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

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Drmwvr7266

Board Regular
Joined
Apr 7, 2002
Messages
164
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.
 

NateO

Legend
Joined
Feb 17, 2002
Messages
9,700
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
 

Forum statistics

Threads
1,144,052
Messages
5,722,242
Members
422,418
Latest member
Chipsy

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
Top