Hide row based on cell value
Try the below macro...
Sub HideRows()
For lngRow = 1 To Cells(Rows.Count, 3).End(xlUp).Row
If DateDiff("m", Range("c" & lngRow), Date) 48 And _
0 + Range("c" & lngRow) < 0 Then Rows(lngRow).Hidden = True
Next
End Sub
If this post helps click Yes
---------------
Jacob Skaria
"Munchkin" wrote:
Colum C shows a date. If the date shown is older than 4 years I want the row
to be hidden.
Is it possible to do this?
|