View Single Post
 
Old 06-19-2018, 01:59 PM
LearnerExcel LearnerExcel is offline Windows 7 32bit Office 2013
Advanced Beginner
 
Join Date: Nov 2016
Posts: 82
LearnerExcel will become famous soon enoughLearnerExcel will become famous soon enough
Default

Quote:
Originally Posted by Logit View Post
.
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
Thanks for the code. But What I want is the result that is highlighted in YELLOW in the attached file. Not the ones which is strikethrough in red color font.
Attached Images
File Type: png RSLT.PNG (3.0 KB, 17 views)
Reply With Quote