Hide row where Date less than this month
Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Hide row where Date less than this month
Thanks Thanks: 0 Likes Likes: 0

  1. #11
    Board Regular
    Join Date
    Nov 2004
    Posts
    940
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Hide row where Date less than this month

    Fair enough appreciate the time that you have spent on this thank you

  2. #12
    Board Regular
    Join Date
    Jul 2012
    Location
    Hampshire, UK
    Posts
    4,931
    Post Thanks / Like
    Mentioned
    21 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Hide row where Date less than this month

    Hi,
    try modification to NoSparks original suggestion to include type conversion function Clng & see if it will now work for you


    Code:
    Private Sub Worksheet_Activate()
        With Range("C7", Range("C" & Rows.Count).End(xlUp))
            .AutoFilter Field:=1, _
            Criteria1:=">=" & CLng(DateSerial(Year(Date), Month(Date), 1)), _
            Operator:=xlFilterValues
        End With
    End Sub
    Dave

  3. #13
    Board Regular
    Join Date
    Nov 2004
    Posts
    940
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Hide row where Date less than this month

    Hi Dave thank you and it seems to be working a treat. Much appreciated

  4. #14
    Board Regular
    Join Date
    Jul 2012
    Location
    Hampshire, UK
    Posts
    4,931
    Post Thanks / Like
    Mentioned
    21 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Hide row where Date less than this month

    Quote Originally Posted by lapta301 View Post
    Hi Dave thank you and it seems to be working a treat. Much appreciated

    Glad suggestion resolved issue for you

    Dave

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •