Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Thank you in advance to anyone who can help. I'm trying to create a combo box that is linked to a range on a worksheet that is populated by a vlookup. Depending on what is being looked up blanks appear in the data range, how do I get the combobox not to show these blanks? Many thanks Euan |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
And you're populating the combobox via code?
You could loop through the range and check to see what's in each cell. I guessed that you were using a combobox in a Userform (in the VBE): Option Explicit Private Sub UserForm_Initialize() Dim myCell As Range Dim myRng As Range With Worksheets("sheet1") Set myRng = .Range("a1", .Cells(.Rows.Count, "A").End(xlUp)) End With With Me.ComboBox1 .Clear .RowSource = "" For Each myCell In myRng.Cells If Trim(myCell.Value) = "" Then 'skip it Else .AddItem myCell.Value End If Next myCell End With End Sub EP007 wrote: Hi Thank you in advance to anyone who can help. I'm trying to create a combo box that is linked to a range on a worksheet that is populated by a vlookup. Depending on what is being looked up blanks appear in the data range, how do I get the combobox not to show these blanks? Many thanks Euan -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Do you have any code developed yet?
"EP007" wrote: Hi Thank you in advance to anyone who can help. I'm trying to create a combo box that is linked to a range on a worksheet that is populated by a vlookup. Depending on what is being looked up blanks appear in the data range, how do I get the combobox not to show these blanks? Many thanks Euan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Variable length array that exludes (possible) blanks in the middle | Excel Discussion (Misc queries) | |||
copy range of cells with blanks then paste without blanks | Excel Programming | |||
copy range of cells with blanks then paste without blanks | Excel Worksheet Functions | |||
Fill combo box ignoring blanks | Excel Programming | |||
Paste Special Skip Blanks not skipping blanks, but overwriting... | Excel Discussion (Misc queries) |