ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Filter using combo box (https://www.excelbanter.com/excel-programming/317512-filter-using-combo-box.html)

Rachael[_3_]

Filter using combo box
 
hello peeps.. i will like to make use of a combo box to filter out 2
columns on my spreadsheet. Users can either filter column A or B.
however, i'm at loss when it comes to displaying the filter results.
The results should display the entire row. Any help? thanks =)

rach85[_2_]

Filter using combo box
 

thanks! just wanted to try using combo box

--
rach8
-----------------------------------------------------------------------
rach85's Profile: http://www.excelforum.com/member.php...fo&userid=1655
View this thread: http://www.excelforum.com/showthread.php?threadid=31925


mangesh_yadav[_210_]

Filter using combo box
 

Place a combo-box in the column and assign the source to th
ListFillRange. Then put the following code in it.


Private Sub ComboBox1_Change()

Cells.EntireRow.Hidden = False
Set rng = Range(Range("a2"), Range("a2").End(xlDown))

For Each cl In rng

If Trim(cl.Value) < Trim(ComboBox1.Value) Then
cl.EntireRow.Hidden = True
End If

Next

End Sub


- Manges

--
mangesh_yada
-----------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...fo&userid=1047
View this thread: http://www.excelforum.com/showthread.php?threadid=31925



All times are GMT +1. The time now is 09:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com