Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
DW DW is offline
external usenet poster
 
Posts: 11
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default 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   Report Post  
Posted to microsoft.public.excel.programming
sf sf is offline
external usenet poster
 
Posts: 12
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default 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   Report Post  
Posted to microsoft.public.excel.programming
SD SD is offline
external usenet poster
 
Posts: 24
Default 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   Report Post  
Posted to microsoft.public.excel.programming
saf saf is offline
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2002: Auto Filter Sub Total formula Mr. Low Excel Discussion (Misc queries) 2 May 20th 09 02:23 PM
DataFilterAuto Filter in excel 2007? TIJ New Users to Excel 2 November 13th 08 03:28 AM
Limit filter options in Auto Filter lista72 Excel Discussion (Misc queries) 1 January 23rd 08 04:01 PM
Formula for Auto filter Mike Busch Excel Discussion (Misc queries) 1 March 15th 06 06:41 PM
Excel auto filter doesn't recoginize case - won't filter AA from A Mikey Excel Discussion (Misc queries) 1 September 29th 05 08:18 PM


All times are GMT +1. The time now is 10:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"