+ Reply to Thread
Results 1 to 4 of 4

Hide any row that has no colored cells

  1. #1
    Registered User
    Join Date
    12-12-2019
    Location
    canada
    MS-Off Ver
    2019
    Posts
    1

    Hide any row that has no colored cells

    Hi, I'm trying to build on a VBA script used to hide all rows that are blank, however it is hiding rows only where column A is blank.

    If cell in column B is yellow, it still hides this row.

    I am trying to only show rows that have at least one highlighted cell in the row.

    Any advice?

    Please Login or Register  to view this content.
    Last edited by alansidman; 12-12-2019 at 11:07 AM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,870

    Re: Hide any row that has no colored cells

    Code Tags Added
    Your post does not comply with Rule 2 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    12-22-2019
    Location
    london
    MS-Off Ver
    2016
    Posts
    5

    Re: Hide any row that has no colored cells

    Hi,

    From a simple approach, if you need to only show rows that have at least one highlighted cell in the row, you will need to go through each cell in each row.
    See below a code example working for a sheet verifying that cells are not empty in the first column as a requirement(uniqueID).
    Column "J" is the last column as it is suggested in your original code.
    it will only show rows that have at least one highlighted cell in the row.

    Please Login or Register  to view this content.
    Last edited by stephane ramael; 12-23-2019 at 08:00 AM. Reason: spelling

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Hide any row that has no colored cells

    Moved to the correct subforum. Please be careful in the future

+ 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: 26
    Last Post: 08-07-2017, 02:46 PM
  2. [SOLVED] Apply macro to unique seqence of cells colored cells
    By capson in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-04-2016, 11:49 PM
  3. Replies: 4
    Last Post: 01-19-2016, 10:24 PM
  4. Auto skip colored cells VBA but include conditionally formatted cells also
    By Cremorneguy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-31-2014, 03:44 AM
  5. vba to select colored tabs and hide empty rows within a range in each tab
    By lynnsong986 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-23-2014, 01:07 PM
  6. Replies: 1
    Last Post: 11-09-2013, 02:43 AM
  7. Have blocks of blue colored cells ... want them surrounded by lavender-colored cells
    By rocket1406 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-01-2007, 03:59 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