Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-25-2014, 05:00 AM
OTPM OTPM is offline Autofilter on two Date Columns Windows 7 32bit Autofilter on two Date Columns Office 2010 32bit
Expert
Autofilter on two Date Columns
 
Join Date: Apr 2011
Location: West Midlands
Posts: 981
OTPM is on a distinguished road
Default Autofilter on two Date Columns

Hi Folks
I am having trouble using VBA to Autofilter on two date columns using VBA. I have searched and failed miserably :-(.
Basically I have two columns, one called "Proximity Date" and one called "Elimination Date". What I want is to Autofilter my list where todays date falls between those two columns.
Any held/advice appreciated.
Thanks in advance.


Tony
Reply With Quote
  #2  
Old 04-27-2014, 12:57 PM
RudiS RudiS is offline Autofilter on two Date Columns Windows 8 Autofilter on two Date Columns Office 2013
Novice
 
Join Date: Mar 2014
Posts: 10
RudiS is on a distinguished road
Default

I'm not sure if I understand correctly, but try something like this:
Code:
Sub FilterToday()
    With ActiveSheet.Range("A1").CurrentRegion
        .AutoFilter Field:=2, Criteria1:=xlFilterToday, Operator:=xlFilterDynamic
        .AutoFilter Field:=3, Criteria1:=xlFilterToday, Operator:=xlFilterDynamic
    End With
End Sub
Reply With Quote
  #3  
Old 04-29-2014, 12:42 AM
OTPM OTPM is offline Autofilter on two Date Columns Windows 7 32bit Autofilter on two Date Columns Office 2010 32bit
Expert
Autofilter on two Date Columns
 
Join Date: Apr 2011
Location: West Midlands
Posts: 981
OTPM is on a distinguished road
Default

Hi Rudi
Not quite what I was after but thanks for the response anyway. I have now managed to resolve my issue.
Kind regards
Tony
Reply With Quote
  #4  
Old 04-29-2014, 12:56 AM
RudiS RudiS is offline Autofilter on two Date Columns Windows 8 Autofilter on two Date Columns Office 2013
Novice
 
Join Date: Mar 2014
Posts: 10
RudiS is on a distinguished road
Default

Great to know...
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create statis Baseline date columns Ross Jackson Project 3 12-17-2015 04:00 PM
Trying to autofilter 8-10 rows of numbers to sort in a group Jack-P-Winner Excel 0 11-25-2013 10:55 PM
Autofilter on two Date Columns Sum on AutoFilter Grasshopper Excel 3 02-14-2013 01:41 AM
Autofilter on two Date Columns AutoFilter Criteria3 coxjamd Excel Programming 2 01-17-2013 02:24 PM
Autofilter on two Date Columns How to compare 2 columns with other two columns in EXECL 2007? Learner7 Excel 5 06-12-2010 09:54 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:10 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft