Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 06-17-2018, 09:58 PM
Logit Logit is offline How to autofilter by exact date? Windows 10 How to autofilter by exact date? Office 2007
Expert
 
Join Date: Jan 2017
Posts: 587
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

.
I know you said FILTER ... but here is a macro that will do the same as requested. Your
variable STARTDATE can refer to a specific cell ?

Code:
Option Explicit

Sub HideRowsContainingValue()
'Description: This macro will loop through a col and
'hide the row if the cell in Col A does not the value of A1.
    
Dim c As Range
Application.ScreenUpdating = False
    For Each c In Range("A2:A100").Cells
        If c.Value < Range("A1").Value Then
            c.EntireRow.Hidden = True
        End If
    Next c
Application.ScreenUpdating = True

End Sub

Sub UnhideAllColumns()
'This macro will unhide all the columns in the
'specified range.
Application.ScreenUpdating = False

    Range("A1:A100").EntireRow.Hidden = False

Application.ScreenUpdating = True
End Sub
Attached Files
File Type: xlsm Hide Rows.xlsm (17.8 KB, 12 views)
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to write if condition for AutoFilter to check ..? LearnerExcel Excel Programming 1 05-05-2018 08:53 AM
Autofilter on two Date Columns OTPM Excel Programming 3 04-29-2014 12:56 AM
How to autofilter by exact date? How to count even exact date 90 days redza Excel 1 09-17-2013 03:36 AM
How to autofilter by exact date? Sum on AutoFilter Grasshopper Excel 3 02-14-2013 01:41 AM
How to autofilter by exact date? AutoFilter Criteria3 coxjamd Excel Programming 2 01-17-2013 02:24 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:45 PM.


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