Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All -
First let me say that you all have been a great help in the past! :o) This is a pretty simple question. I've created a drop-down list box in cell F1 (fed from another sheet), and the values in Range F5:F200 match one of the values in the list. So - when I select the value in the list-box, I need the worksheet to automatically filter out the rows that do not match the list-box value. Appreciate the help! John |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi John
Place this event code in the code sheet for the desired sheet: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$F$1" Then Range("F4:F200").AutoFilter Field:=1, Criteria1:=Target.Value, Operator:=xlAnd End If End Sub Regards, Per "Brenner" skrev i meddelelsen ... Hi All - First let me say that you all have been a great help in the past! :o) This is a pretty simple question. I've created a drop-down list box in cell F1 (fed from another sheet), and the values in Range F5:F200 match one of the values in the list. So - when I select the value in the list-box, I need the worksheet to automatically filter out the rows that do not match the list-box value. Appreciate the help! John |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That works great! One quick question...
If I add the text "All" to the top of the drop-down list - what do I add to your code to get everything to "redisplay"? Thanks! John "Per Jessen" wrote: Hi John Place this event code in the code sheet for the desired sheet: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$F$1" Then Range("F4:F200").AutoFilter Field:=1, Criteria1:=Target.Value, Operator:=xlAnd End If End Sub Regards, Per "Brenner" skrev i meddelelsen ... Hi All - First let me say that you all have been a great help in the past! :o) This is a pretty simple question. I've created a drop-down list box in cell F1 (fed from another sheet), and the values in Range F5:F200 match one of the values in the list. So - when I select the value in the list-box, I need the worksheet to automatically filter out the rows that do not match the list-box value. Appreciate the help! John |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi John
Thanks for your reply. Try this: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$F$1" Then If Target.Value = "All" Then Range("F4:F200").AutoFilter Else Range("F4:F200").AutoFilter Field:=1, Criteria1:=Target.Value, Operator:=xlAnd End If End If End Sub Regards, Per On 18 Nov., 22:11, Brenner wrote: That works great! One quick question... If I add the text "All" to the top of the drop-down list - what do I add to your code to get everything to "redisplay"? Thanks! John "PerJessen" wrote: Hi John Place this event code in the code sheet for the desired sheet: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$F$1" Then * * Range("F4:F200").AutoFilter Field:=1, Criteria1:=Target.Value, Operator:=xlAnd End If End Sub Regards, Per "Brenner" skrev i meddelelsen ... Hi All - First let me say that you all have been a great help in the past! :o) This is a pretty simple question. I've created a drop-down list box in cell F1 (fed from another sheet), and the values in Range F5:F200 match one of the values in the list. So - when I select the value in the list-box, I need the worksheet to automatically filter out the rows that do not match the list-box value. Appreciate the help! John- Skjul tekst i anførselstegn - - Vis tekst i anførselstegn - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do i filter dependents already selected in drop down list | Excel Discussion (Misc queries) | |||
FILTER FUNCTION DOES NOT SHOW TOTAL RECORDS SELECTED | Excel Worksheet Functions | |||
Drop down lists that auto create and then filter the next drop down list | Excel Worksheet Functions | |||
Extracting selected records from longer list | Excel Discussion (Misc queries) | |||
Select part numbers from a list; calculate statistics from selected records | Excel Programming |