Select a filtered Range with vba

Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Select a filtered Range with vba

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

    Default Select a filtered Range with vba

     
    Hi all,

    How, using vba, can I tell Excel to select ALL cells in a Filtered Range in Column J where the range begins below the heading in Cell J20.

    Thanks

  2. #2

    Join Date
    Feb 2003
    Location
    Gurgaon/Thrissur
    Posts
    2,615
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Select a filtered Range with vba

    Hi,

    something like..

    Code:
    Dim Rng As Range
    With Range("j20")
        .AutoFilter field:=1, Criteria1:="YourCriteria"
        Set Rng = .Offset(1).Resize(.Rows.Count - 1, 1).SpecialCells(xlCellTypeVisible)
    end with

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

    Default Re: Select a filtered Range with vba

      
    Thank your very much Kris.

User Tag List

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
  •  

 

 
DMCA.com