+ Reply to Thread
Results 1 to 5 of 5

Make .Offset pass over visible rows only?

  1. #1
    Registered User
    Join Date
    12-19-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    24

    Make .Offset pass over visible rows only?

    Hi all,

    I'm having a problem that seems simply enough but I'm having poor luck finding a solution on the internet.

    Currently, I'm looping over a couple of criteria that filters a range.

    During the loop I would like to split and assign the first visible value below a certain header, MemHeader, to a variable. What I have so far is this:
    Please Login or Register  to view this content.
    The only problem now, given that the range is filtered, is that the above code always chooses row number 1, which of course means that MemberID will always be the same.

    So, is there a way of using .Offset and make it pass over only the visible rows?

    Thanks and best regards,

  2. #2
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Make .Offset pass over visible rows only?

    Would something like this work? MemIDs would need to be defined by you, basically it would be the column of MemberID's.

    Also, you said you wanted the first visible value, which would be Split(0), not Split(1)

    Please Login or Register  to view this content.

  3. #3
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Make .Offset pass over visible rows only?

    Perhaps something like:-
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    12-19-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Make .Offset pass over visible rows only?

    Quote Originally Posted by walruseggman View Post
    Would something like this work? MemIDs would need to be defined by you, basically it would be the column of MemberID's.

    Also, you said you wanted the first visible value, which would be Split(0), not Split(1)

    Please Login or Register  to view this content.
    Thanks mate, it worked!
    Quote Originally Posted by MickG View Post
    Perhaps something like:-
    Please Login or Register  to view this content.
    I'll keep your solution saved for another project!

    Thanks to the both of you!

  5. #5
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Make .Offset pass over visible rows only?

    You're welcome

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Use visible rows from autofilter to build Pivot table. Or use visible rows to Copy/Paste
    By mwhitedesigns in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-08-2012, 10:34 AM
  2. [SOLVED] How to make a range of Cells / rows Visible or Invisible basis 1 input value
    By Siddps in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-05-2012, 08:58 PM
  3. Make multiple rows visible
    By ndjustin20 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-16-2011, 05:10 PM
  4. Any way to make SUMIF only compute visible rows?
    By gtzpower in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-27-2007, 11:54 AM
  5. Fast way to make rows visible and invisible
    By gimme_this_gimme_that@yahoo.com in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-09-2006, 03:20 PM

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