Excel Macro

Permabanned
Joined
3 Dec 2004
Posts
2,304
Location
Sheffield
Hi guys, I need some help writing a macro that will search column U for dates between 1/1/06 and 28/1/06, and hide any cells/rows that arent related to these dates.

Anyhelp would be much apreciated. Cheers
 
Thanks mate, I found an Excel forum where some guys helped me out, your code is similar to theirs.

Code:
Sub DownSelect()
    Dim c As Range
    For Each c In Range("V1:V" & Cells(Rows.Count, 22).End(xlUp).Row)
        If c < DateSerial(2006, 1, 1) Or c > DateSerial(2006, 1, 28) Then c.EntireRow.Hidden = True
    Next c
End Sub

For future reference.
 
Back
Top Bottom