I have a combobox that is referencing a long list on a separate workskeet (sheet3) and I want to use the name for what the user chooses and hide all rows that do NOT contain that name/value from a column... Basically, I am wanting to use VBA/activeX with a combobox to do the same thing as filtering
So if "Spray & Forget" is chosen from the list it will filter out everything from the 'customer' column in G that isnt "Spray & Forget".
My code I have so far: (its incomplete and wrong, I know... still very much greeen when it comes to VBA )
So if "Spray & Forget" is chosen from the list it will filter out everything from the 'customer' column in G that isnt "Spray & Forget".
My code I have so far: (its incomplete and wrong, I know... still very much greeen when it comes to VBA )
Code:
Private Sub ComboBox1_Change()
Range("H1") = ComboBox1.Value
'drop down list for selecting a Customer in order to filter down the list
Dim lCol As Long
lCol = ActiveSheet.UsedRange.Columns.Count
rCol = ActiveSheet.UsedRange.Rows.Count
For Each Cell In Range(Cells(10, 1), Cells(rCol, lCol))
Next
End Sub