VBA to filter dates

sswcharlie

New Member
Joined
Jun 26, 2005
Messages
45
Office Version
  1. 2016
Platform
  1. Web
Hi

I have 2 columns (dynamic named range called 'Seven') one with data and next column the date data was entered. Just need date only, not time etc.

I want to list separately in an adjacent column, say D1, the items that have a date older than the current date. That is to remove the current date items and list items with dates before current date.

So far I have but it is only guesswork.

Range("Seven").AutoFilter Field:=1, Criteria1:="<" & CurrentDate

Need comments on it, and how do I show to place results in column D1

thankyou
CharlesHarris
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

Forum statistics

Threads
1,215,064
Messages
6,122,936
Members
449,094
Latest member
teemeren

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top