+ Reply to Thread
Results 1 to 3 of 3

Hiding Dynamic Range of Numbers Using Row Numbers

  1. #1
    Registered User
    Join Date
    01-14-2012
    Location
    Arizona, United States
    MS-Off Ver
    Excel 2000
    Posts
    16

    Hiding Dynamic Range of Numbers Using Row Numbers

    Hello All,

    I am trying to figure out how to hide a range of rows that changes. The rows that need to be hidden will be determined in the macro code as a cell value changes. The first row and last row in the range of rows to be hidden will be represented by their row number for example the cell A117 is in row 117. One example of the range of rows to be hidden is 101 through 117:

    HideRowBeg = 48+53 =101 (53 is the value in cell A6)
    HideRowEnd = 117

    I tried this code, but realize that the dimensions defined cannot be used in the range. How do I go about using the defined dimensions in a range or otherwise?

    Please Login or Register  to view this content.
    I was able to use the following code, but prefer not to because it adds to the time to run the code and I might need to use this code multiple times to hide multiple ranges of rows.

    Please Login or Register  to view this content.
    Last edited by Freek; 02-27-2021 at 12:02 AM.

  2. #2
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Hiding Dynamic Range of Numbers Using Row Numbers

    You could use your first attempt a follows

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-14-2012
    Location
    Arizona, United States
    MS-Off Ver
    Excel 2000
    Posts
    16

    Re: Hiding Dynamic Range of Numbers Using Row Numbers

    Thank you maniacb! That worked perfectly!

+ 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. Replies: 4
    Last Post: 10-20-2020, 04:15 PM
  2. Calculating the mean of a dynamic middle range of numbers
    By willreidsmith in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-03-2019, 10:38 AM
  3. [SOLVED] Entering names from a dynamic range in another spreadsheet, then adding numbers
    By Andrewstupendo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-29-2018, 03:21 PM
  4. Exclude non numeric numbers from Excel chart using dynamic name range
    By Arrie12 in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 04-20-2018, 10:38 AM
  5. Copy a range based on dynamic row numbers and paste into another workbook
    By Grizz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-09-2013, 02:07 PM
  6. Hiding range of numbers
    By gailb14 in forum Excel General
    Replies: 3
    Last Post: 06-22-2010, 03:11 PM
  7. Return the row numbers or a dynamic range in VBA
    By Jim in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-14-2005, 12:05 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