Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Autofilter uses a string when comparing and the value number of a cell with a date is a number. The number will not match the string. the best solution is this From : Cells.AutoFilter Field:=4, Criteria1:=Sheets("Worksheet").Range("Q2").Value To : DateStr = format(Sheets("Worksheet").Range("Q2").Value,"mm-dd-yy") Cells.AutoFilter Field:=4, Criteria1:=DateStr The "mm-dd-yy" must match the format of the data in the worksheet. Change the format as required. -- joel ------------------------------------------------------------------------ joel's Profile: 229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=165290 Microsoft Office Help |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Autofilter problem | Excel Discussion (Misc queries) | |||
Problem with AutoFilter | Excel Programming | |||
Problem using Autofilter | Excel Programming | |||
AutoFilter VBA Problem | Excel Discussion (Misc queries) | |||
AutoFilter Problem | Excel Programming |