Results 1 to 3 of 3

Select a filtered Range with vba

This is a discussion on Select a filtered Range with vba within the Excel Questions forums, part of the Question Forums category; Hi all, How, using vba , can I tell Excel to select ALL cells in a Filtered Range in Column ...

  1. #1
    Board Regular
    Join Date
    Nov 2008
    Posts
    211

    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

    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

    Default Re: Select a filtered Range with vba

    Thank your very much Kris.

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