Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Filter
Hi,
I have been trying to get a filter to change depending on a number in a range. Reason: My worksheet has data that contains numbers from 60 to 70 in one of the columns (Filtered) and If I was to enter 65 say, into my range (num_1) I then want the macro to filter on 65. My poor attempt showing what I think is the key part of the code Number = Range("num_1").Value Selection.AutoFilter Field:=5, Criteria1:=" & Number & " For some reason it filters on CUSTOM Any help greatly Appreciated John |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Filter
Try this
Number = Range("num_1").Value Selection.AutoFilter Field:=5, Criteria1:=Number -- Regards, Tom Ogilvy "JohnUK" wrote: Hi, I have been trying to get a filter to change depending on a number in a range. Reason: My worksheet has data that contains numbers from 60 to 70 in one of the columns (Filtered) and If I was to enter 65 say, into my range (num_1) I then want the macro to filter on 65. My poor attempt showing what I think is the key part of the code Number = Range("num_1").Value Selection.AutoFilter Field:=5, Criteria1:=" & Number & " For some reason it filters on CUSTOM Any help greatly Appreciated John |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Filter
Hello Tom
Ha - something as simple as that eh? Many thanks - again Best Wishes Regards John "Tom Ogilvy" wrote: Try this Number = Range("num_1").Value Selection.AutoFilter Field:=5, Criteria1:=Number -- Regards, Tom Ogilvy "JohnUK" wrote: Hi, I have been trying to get a filter to change depending on a number in a range. Reason: My worksheet has data that contains numbers from 60 to 70 in one of the columns (Filtered) and If I was to enter 65 say, into my range (num_1) I then want the macro to filter on 65. My poor attempt showing what I think is the key part of the code Number = Range("num_1").Value Selection.AutoFilter Field:=5, Criteria1:=" & Number & " For some reason it filters on CUSTOM Any help greatly Appreciated John |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can I change the font on auto filter? | Excel Discussion (Misc queries) | |||
Use date modified to change format & create filter to track change | Excel Worksheet Functions | |||
change position of filter button | Excel Worksheet Functions | |||
Capture Auto-Filter Change | Excel Programming | |||
How do I run a filter then have my countif change? | Excel Worksheet Functions |