Linked Combo Boxes-dataTable lookup

03856me

Active Member
Joined
Apr 4, 2008
Messages
297
I have pieced together the following code to link my second combo box based on the value of the first combo box. I have a couple of issues that I could use your help with to make this more functional. Once this code is working then I will apply it to about 6 other combo boxes.

Specifics: I have a "lookupTable" on the "Lookups" tab that contains many columns of data starting in column 13.

Issue#1 - my code duplicates the values in column 14 when filtering it.

Issue#2 - this is a table, is there a way to use the table[column] names instead of 1000 rows, that way when the table grows all is well?

I am open to another way to doing this - most efficient is what I am looking for.

Code:
Private Sub cbo_group_change()
    Dim I As Long
    Dim ws As Worksheet 
        Set ws = Worksheets("Lookups")
        cbo_kiln.Clear
 
      [COLOR=seagreen]  'I would like to use the table column name here instead of 1000 rows[/COLOR]
        For I = 13 To ws.Cells(1000, 13).End(xlUp).Row
            If ws.Cells(I, 13) = cbo_group.Value Then
                cbo_kiln.AddItem ws.Cells(I, 14)
            End If
        Next I
End Sub
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

Forum statistics

Threads
1,214,920
Messages
6,122,267
Members
449,075
Latest member
staticfluids

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