Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can I insert a formula into the autofilter? for example I want to find all
items due today. So I might use the Now() function to return todays date in the vba code. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
AFAIK this is not possible. You may use the advanced filter instead -- Regards Frank Kabel Frankfurt, Germany "dw" schrieb im Newsbeitrag ... Can I insert a formula into the autofilter? for example I want to find all items due today. So I might use the Now() function to return todays date in the vba code. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
dw,
In VBA code, you can do something like this, to filter column C. The numberformat is necessary because Excel filters based on formatted values. Range("C:C").AutoFilter Field:=1, Criteria1:=Format(Now(), Range("C2").NumberFormat) HTH, Bernie MS Excel MVP "dw" wrote in message ... Can I insert a formula into the autofilter? for example I want to find all items due today. So I might use the Now() function to return todays date in the vba code. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, but how do I reference a range of dates such that the range is equal
to today and today +30 days I can't seem to locate info on how to enter a range in Advanced filter "Bernie Deitrick" wrote: dw, In VBA code, you can do something like this, to filter column C. The numberformat is necessary because Excel filters based on formatted values. Range("C:C").AutoFilter Field:=1, Criteria1:=Format(Now(), Range("C2").NumberFormat) HTH, Bernie MS Excel MVP "dw" wrote in message ... Can I insert a formula into the autofilter? for example I want to find all items due today. So I might use the Now() function to return todays date in the vba code. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
sf,
Try Range("C:C").AutoFilter Field:=1, _ Criteria1:="=" & Now(), _ Operator:=xlAnd, _ Criteria2:="<=" & Now() + 30 -- HTH, Bernie MS Excel MVP "sf" wrote in message ... Thanks, but how do I reference a range of dates such that the range is equal to today and today +30 days I can't seem to locate info on how to enter a range in Advanced filter "Bernie Deitrick" wrote: dw, In VBA code, you can do something like this, to filter column C. The numberformat is necessary because Excel filters based on formatted values. Range("C:C").AutoFilter Field:=1, Criteria1:=Format(Now(), Range("C2").NumberFormat) HTH, Bernie MS Excel MVP "dw" wrote in message ... Can I insert a formula into the autofilter? for example I want to find all items due today. So I might use the Now() function to return todays date in the vba code. |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks I'll give it a try
"Bernie Deitrick" wrote: sf, Try Range("C:C").AutoFilter Field:=1, _ Criteria1:="=" & Now(), _ Operator:=xlAnd, _ Criteria2:="<=" & Now() + 30 -- HTH, Bernie MS Excel MVP "sf" wrote in message ... Thanks, but how do I reference a range of dates such that the range is equal to today and today +30 days I can't seem to locate info on how to enter a range in Advanced filter "Bernie Deitrick" wrote: dw, In VBA code, you can do something like this, to filter column C. The numberformat is necessary because Excel filters based on formatted values. Range("C:C").AutoFilter Field:=1, Criteria1:=Format(Now(), Range("C2").NumberFormat) HTH, Bernie MS Excel MVP "dw" wrote in message ... Can I insert a formula into the autofilter? for example I want to find all items due today. So I might use the Now() function to return todays date in the vba code. |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How do I enter this criteria into an advanced filter? I can put in the first
criteria :="=" & Now(), but the second one eludes me. Thanks "Bernie Deitrick" wrote: sf, Try Range("C:C").AutoFilter Field:=1, _ Criteria1:="=" & Now(), _ Operator:=xlAnd, _ Criteria2:="<=" & Now() + 30 -- HTH, Bernie MS Excel MVP "sf" wrote in message ... Thanks, but how do I reference a range of dates such that the range is equal to today and today +30 days I can't seem to locate info on how to enter a range in Advanced filter "Bernie Deitrick" wrote: dw, In VBA code, you can do something like this, to filter column C. The numberformat is necessary because Excel filters based on formatted values. Range("C:C").AutoFilter Field:=1, Criteria1:=Format(Now(), Range("C2").NumberFormat) HTH, Bernie MS Excel MVP "dw" wrote in message ... Can I insert a formula into the autofilter? for example I want to find all items due today. So I might use the Now() function to return todays date in the vba code. |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
saf,
That was for a VBA solution. For Advanced filtering, set up a 2x2 table like so, with the formulas given Date Date ="="&NOW() ="<="&(NOW()+30) Of course, the "Date" needs to match your actual header value. HTH, Bernie MS Excel MVP "saf" wrote in message ... How do I enter this criteria into an advanced filter? I can put in the first criteria :="=" & Now(), but the second one eludes me. Thanks "Bernie Deitrick" wrote: sf, Try Range("C:C").AutoFilter Field:=1, _ Criteria1:="=" & Now(), _ Operator:=xlAnd, _ Criteria2:="<=" & Now() + 30 -- HTH, Bernie MS Excel MVP "sf" wrote in message ... Thanks, but how do I reference a range of dates such that the range is equal to today and today +30 days I can't seem to locate info on how to enter a range in Advanced filter "Bernie Deitrick" wrote: dw, In VBA code, you can do something like this, to filter column C. The numberformat is necessary because Excel filters based on formatted values. Range("C:C").AutoFilter Field:=1, Criteria1:=Format(Now(), Range("C2").NumberFormat) HTH, Bernie MS Excel MVP "dw" wrote in message ... Can I insert a formula into the autofilter? for example I want to find all items due today. So I might use the Now() function to return todays date in the vba code. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2002: Auto Filter Sub Total formula | Excel Discussion (Misc queries) | |||
DataFilterAuto Filter in excel 2007? | New Users to Excel | |||
Limit filter options in Auto Filter | Excel Discussion (Misc queries) | |||
Formula for Auto filter | Excel Discussion (Misc queries) | |||
Excel auto filter doesn't recoginize case - won't filter AA from A | Excel Discussion (Misc queries) |