Folks,
Thanks to 0EGO from the forum to get me this code working fine, however,If you see above, Cell reference "D2" checks for a date value from a pop up calendar I have on that cell. Currently, it filters only for that selected value. However, I need it to display all values "LESS" than the selected date value. Please advise,
Example: If the user selects 1st February 2012 on "D2", the filter should display all rows with date BEFORE 1st February 2012, currently it gives all rows with the date as 1st February 2012.
Thanks for your help
Private Sub Worksheet_Change(ByVal Target As Range) If Target = Range("D2") Then Range("A13").CurrentRegion.AdvancedFilter _ Action:=xlFilterInPlace, _ CriteriaRange:=Range("D1:D2") End If End Sub
Last edited by ame; 02-09-2012 at 02:20 PM.
In D2 cell enter the following
="<="&DATE(2012,2,1)
Hello KVS,
I seem to miss something, Please look at attached,
Cell D3 has the pop up calendar,
Cell D2 has the changes you mentioned,
The VB function makes the filter work based on the change to cell D2 but it does not give the required output.
Example, If the user selects 02/09/2012 (todays date) from the calendar (Cell D3), the table should list all the rows as the values in column I are less than todays date.
Thanks for your help
Works Great..Thank You solved
this issue was resolved
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks