Results 1 to 13 of 13

Hide Multiple Rows Based upon a variable

Threaded View

  1. #1
    Forum Contributor
    Join Date
    12-20-2011
    Location
    United States, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    295

    Question Hide Multiple Rows Based upon a variable

    I would like to define a variable that is comprised of (3) rows (that is why I am using the resize(3,1) command) - but the range location is unknown so I have to used the find command.

    Dim xyz_rows As Long
        
        xyz_rows = Sheet5.Range("C:C").Find("example", , xlValues, xlWhole, xlByRows, , True).Resize(3, 1).Row

    I dont know if that is correct or not. Do I use ".Row" or ".Rows" since its more than one?

    Then once that range is found, I am writing a if statment that will do the following:
    Sheet5.Rows(xyz_rows).EntireRow.Hidden = True

    But of coarse, this isnt working correctly, so hence my post. How do I accomplish this correctly?

    Thanks in advance.
    Last edited by clemsoncooz; 02-22-2012 at 12:40 PM.

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