Auto Filter Customizaton

M

Mike Lewis

Hi Marcy,

One way - create two cells that show the upper and lower
date interval, (something like: =now()+14)

Once these are established, create the auto filter, and
then a macro like this will show the desired records.

Sub Button4_Click()
Dim up, low
low = Range("e3")
up = Range("e2")

Selection.AutoFilter Field:=1, Criteria1:=">" & low,
Operator:=xlAnd, Criteria2:="<" & up

End Sub

I am not much of a VBA guy, so there may be a better way.

Good Luck

Mike

-----Original Message-----
Good morning,all--

Can you please tell me if this would be possible?
I have a s/s with the column titles: A1:Z1
Data is entered in rows A2 thru Z646. (however, the last
row# is ever changing, as new data is entered).
Column F is the delivery DUE date.

What I would like to be able to do is sort for a two-week period (from date of inquiry).
For example, if I were to do this filter/sort today
(7/6), I would lke the results to include all PO's (column
A) and their respective details (A:Z) for week(s) ending
7/16 and 7/23.
 
M

Marcy

Thanks for the suggestion, Mike.
I'll give it a whirl.
--
Marcy


Mike Lewis said:
Hi Marcy,

One way - create two cells that show the upper and lower
date interval, (something like: =now()+14)

Once these are established, create the auto filter, and
then a macro like this will show the desired records.

Sub Button4_Click()
Dim up, low
low = Range("e3")
up = Range("e2")

Selection.AutoFilter Field:=1, Criteria1:=">" & low,
Operator:=xlAnd, Criteria2:="<" & up

End Sub

I am not much of a VBA guy, so there may be a better way.

Good Luck

Mike

-----Original Message-----
Good morning,all--

Can you please tell me if this would be possible?
I have a s/s with the column titles: A1:Z1
Data is entered in rows A2 thru Z646. (however, the last
row# is ever changing, as new data is entered).
Column F is the delivery DUE date.

What I would like to be able to do is sort for a two-week period (from date of inquiry).
For example, if I were to do this filter/sort today
(7/6), I would lke the results to include all PO's (column
A) and their respective details (A:Z) for week(s) ending
7/16 and 7/23.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top