+ Reply to Thread
Results 1 to 3 of 3

in vba, move to next filtered row, not next row

  1. #1
    Registered User
    Join Date
    01-13-2010
    Location
    Bakersfield, CA
    MS-Off Ver
    Excel 2003
    Posts
    37

    in vba, move to next filtered row, not next row

    In a filtered column, I want move to next visible row, so I can copy that cell and paste to a cell outside the filtered list.

    The headers for the filter are in row 3. The cell below C3 has info that I want to copy to cell A2, which is outside the filtered area. The code below moves the selected cell down 1 row (always to row 4) rather than to the next filtered row.

    In the code below, what do I need in place of the activecell.offset command?

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    12-03-2009
    Location
    Providence RI
    MS-Off Ver
    Excel 2007, Excel 2010
    Posts
    260

    Re: in vba, move to next filtered row, not next row

    One way is to loop through the next rows until it finds the applicable row that is not hidden, code would need to be adjusted to fit what you want. Not saying this is the best/fastest way, but it is one way I know of.

    Please Login or Register  to view this content.
    This will place you in A and the first row that is not hidden. If you have data your want to get to the next row you would just add this code prior to the above code:

    Replace:
    Please Login or Register  to view this content.
    With:
    Please Login or Register  to view this content.
    This would go to the end of your data and find the first visible row below.
    Last edited by Dulanic; 05-28-2010 at 08:15 AM.

  3. #3
    Registered User
    Join Date
    01-13-2010
    Location
    Bakersfield, CA
    MS-Off Ver
    Excel 2003
    Posts
    37

    Re: in vba, move to next filtered row, not next row

    thx I will give it a try

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1