Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
fORMULA IN aUTO FILTER
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
|
|||
|
|||
fORMULA IN aUTO FILTER
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
|
|||
|
|||
fORMULA IN aUTO FILTER
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
|
|||
|
|||
fORMULA IN aUTO FILTER
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
|
|||
|
|||
fORMULA IN aUTO FILTER
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
|
|||
|
|||
fORMULA IN aUTO FILTER
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
|
|||
|
|||
fORMULA IN aUTO FILTER
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
|
|||
|
|||
fORMULA IN aUTO FILTER
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. |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
fORMULA IN aUTO FILTER
Hi
I was really really glad to find this here! Problem is, even though I copied it over - it doesn't work for me. I am trying to use just the code - without the +30 days. I've set the formatting(the entire column has the same date format - the 'lookup' format is at then top of the column), to no avail (because originally it was trying to pick up dd/mm/yyy hh:mm). Please help!! SF "Bernie Deitrick" wrote: 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 | |
|
|
Similar Threads | ||||
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) |