+ Reply to Thread
Results 1 to 4 of 4

VBA to hide rows based on specific cells data

  1. #1
    Registered User
    Join Date
    04-25-2019
    Location
    Atlanta, GA
    MS-Off Ver
    microsoft 365
    Posts
    17

    VBA to hide rows based on specific cells data

    Annual Calendar - testing.xlsm

    I'm trying to figure out how to create a VBA code for each month in my workbook that automatically hides rows 24-27 if cell B24 is not part of that month.

    Example: January cell B:24 = 2/4/24 so it is not part of January so Rows 24-27 should hide. While in March cell B:24 is 3/31 so it is part of March and would not hide rows 24-27.

    I have attached the workbook for your review and help.

    Thanks
    Last edited by enelson84; 03-21-2024 at 11:59 AM.

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,177

    Re: VBA to hide rows based on specific cells data

    paste code into a module
    run: HideValAllSheets to cycle thru all sheets to hide the rows

    or run: checkHideValue to run only for the sheet your are currently on.

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,206

    Re: VBA to hide rows based on specific cells data

    Please Login or Register  to view this content.

    place code in "Thisworkbook"
    Attached Files Attached Files
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  4. #4
    Registered User
    Join Date
    04-25-2019
    Location
    Atlanta, GA
    MS-Off Ver
    microsoft 365
    Posts
    17

    Re: VBA to hide rows based on specific cells data

    Thank you so much for your quick response. This is perfect!

+ 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 specific rows based upon color
    By HWF2023 in forum Excel General
    Replies: 2
    Last Post: 03-26-2023, 10:23 AM
  2. Hide rows in a different sheet based on a value (that contains specific letters)
    By steiny88 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-24-2022, 12:58 AM
  3. How to hide some rows based on a specific cell value whilst keeping all unused rows hidden
    By Consultant101 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-15-2021, 06:41 PM
  4. hide rows based on value in specific column
    By beejay67 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-24-2020, 09:27 AM
  5. VBA to hide specific rows based on 2 variables
    By BC90 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-11-2019, 05:26 AM
  6. [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
  7. Macro to hide both rows and columns simultaneously based on data in cells.
    By walker_dp in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-09-2012, 10:47 AM

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