+ Reply to Thread
Results 1 to 4 of 4

Hide rows uneeded, unhide rows needed

  1. #1
    Forum Contributor
    Join Date
    08-30-2015
    Location
    Tresfjord, Norway
    MS-Off Ver
    365
    Posts
    169

    Hide rows uneeded, unhide rows needed

    Hi...

    In this soccer betting spreadsheet, and from the start I've hidden all future coupons, exept this weeks, and next.
    And when I type in the first match in this week's coupon, the coupon for the week after that will unhide.

    I have triied with this solution:
    If Range("e8") = "" Then
    Rows("46:3434").EntireRow.Hidden = True
    Else
    Rows("24:3434").EntireRow.Hidden = False
    Rows("46:3434").EntireRow.Hidden = True
    End If

    If Range("e30") = "" Then
    Rows("68:3434").EntireRow.Hidden = True
    Else
    Rows("46:3434").EntireRow.Hidden = False
    Rows("68:3434").EntireRow.Hidden = True
    End If

    If Range("e52") = "" Then
    Rows("90:3434").EntireRow.Hidden = True
    Else
    Rows("68:3434").EntireRow.Hidden = False
    Rows("90:3434").EntireRow.Hidden = True
    End If

    But after a few weeks it starts getting really slow.
    Se attached workbook.

    Is there another way to do this, so I can avoid this terrible loss of speed?


    I am not an expert in VBA, but I get along. I guess :-D

    Thanks in advance.

    Best wishes
    Tresfjording
    Attached Files Attached Files

  2. #2
    Forum Contributor Dante Amor's Avatar
    Join Date
    07-24-2020
    Location
    MEXICO
    MS-Off Ver
    Excel 2013
    Posts
    212

    Re: Hide rows uneeded, unhide rows needed

    Try this:

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    08-30-2015
    Location
    Tresfjord, Norway
    MS-Off Ver
    365
    Posts
    169

    Re: Hide rows uneeded, unhide rows needed

    Hi Dante Amor
    Your code worked exactly as wanted.
    I had to put in code to unprotect and protect worksheet, that's all.

    Thanks for the code!
    Very appreciated

  4. #4
    Forum Contributor Dante Amor's Avatar
    Join Date
    07-24-2020
    Location
    MEXICO
    MS-Off Ver
    Excel 2013
    Posts
    212

    Re: Hide rows uneeded, unhide rows needed

    I'm glad to help you. Thanks for the feedback.

+ 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. Hide/unhide rows checkbox hide but doesn't unhide
    By windzor in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-08-2021, 11:51 AM
  2. Replies: 1
    Last Post: 11-04-2020, 06:48 PM
  3. [SOLVED] Macro to Hide rows with zeros in column E5:E50, then Unhide all rows
    By aaron061883 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-30-2019, 01:53 AM
  4. [SOLVED] Macro for Hide blank rows and Unhide the rows with cells
    By Neilesh Kumar in forum Excel General
    Replies: 4
    Last Post: 04-12-2017, 06:06 AM
  5. Need Toggle Button to hide/unhide rows based on cell value in non concurrent rows
    By The Phoenix in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-13-2015, 10:49 AM
  6. [SOLVED] Help Needed with Checkboxes to Hide or Unhide Rows
    By dgibney in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-25-2014, 11:39 AM
  7. [SOLVED] First unhide all rows - then hide rows based on specific cell value for a range of cells
    By robbiekh in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-22-2013, 05:46 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