Results 1 to 9 of 9

iterate through SpecialCells(xlCellTypeVisible) Row#, Range.Address

Threaded View

  1. #1
    Forum Contributor dlow's Avatar
    Join Date
    08-12-2013
    Location
    EveryWhere
    MS-Off Ver
    Excel 2007, 2010
    Posts
    275

    Post iterate through SpecialCells(xlCellTypeVisible) Row#, Range.Address

    Hi,

    My problem is that now that I have added a filter there are only 3 visible cell in the range, but "LastRow" is echoing 97, which is correct because that is where the last cell is, but I dont want to iterate through all of the hidden rows till I get to 97.

    Could someone tell me how I need to structure my current ForLoop:
    Dim LastRow As Integer
    LastRow = ActiveSheet.Cells(Rows.Count, "Z").End(xlUp).Row 
    
    Dim iCount As Integer
    '        For iCount = 10 To LastRow
    So that I could use this:
    Dim v As Range 'http://www.ozgrid.com/forum/showthread.php?t=15629&p=79287#post79287
        Set v = Range("A2:G" & Range("A65536").End(xlUp).Row).SpecialCells(xlCellTypeVisible).Cells 
        MsgBox "The cells are " & v.Address
    Im lost & I have been on this all day. Im wish I came here & asked 1st thing this morning. I wasted a whole day #facePalm#


    TIA

    ~Note~
    This is how I was gonna do my Range I tested it & it works. I just dont know how to put it all togehter with a ForLoop.
    ActiveSheet.Range(Cells(10, 26), Cells(LastRow, 26)).SpecialCells(xlCellTypeVisible).Cells
    Last edited by dlow; 03-04-2015 at 07:23 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA Range.SpecialCells( xlCellTypeVisible ) not working as a UDF
    By dwk49 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-29-2012, 05:29 AM
  2. Resize Range SpecialCells xlCellTypeVisible
    By goss in forum Excel General
    Replies: 1
    Last Post: 07-13-2012, 02:13 PM
  3. Count only SpecialCells(xlCellTypeVisible) with a certain .Value
    By jordan2322 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-21-2012, 10:19 PM
  4. Cut & Paste - AutoFilter SpecialCells(xlCellTypeVisible)
    By SunOffice in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-19-2011, 05:28 PM
  5. specialcells(xlcelltypevisible): same code, different results?
    By dreamz in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-12-2006, 12:12 PM

Tags for this Thread

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