+ Reply to Thread
Results 1 to 7 of 7

Macro to loop through column, if blank blank cells then hide rows

Hybrid View

  1. #1
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool Hi ! Try this ‼


    A demonstration as a beginner starter :

    PHP Code: 
    Sub Demo()
            
    Dim VR&
            
    Application.ScreenUpdating False
        
    For Each V In [{8,21,34}]
            
    With Cells(V3).CurrentRegion
                
    For 3 To .Rows.Count Step 2
                    With 
    .Cells(R4).Resize(2)
                        If 
    Application.CountBlank(.Cells) = 2 Then .EntireRow.Hidden True
                    End With
                Next
            End With
        Next
            Application
    .ScreenUpdating True
    End Sub 
    Do you like it ? So thanks to click on bottom left star icon « Add Reputation » !
    Last edited by Marc L; 05-25-2019 at 05:09 AM. Reason: ScreenUpdating optimization …

  2. #2
    Registered User
    Join Date
    11-28-2018
    Location
    Netherlands
    MS-Off Ver
    Office 13
    Posts
    30
    Thank you for your reply really appreciate it, I’m having trouble implementing this on my real sheet, it didn’t work at first go, let me see what I can do.

  3. #3
    Registered User
    Join Date
    11-28-2018
    Location
    Netherlands
    MS-Off Ver
    Office 13
    Posts
    30

    Re: Hi ! Try this ‼

    Hi Marc, I have had trouble with trying to implement this on my real sheet due to the layout being slightly different, I attempted to reflect the changes in the code, but it is not picking it, maybe because I am not the best in coding and forgetting to change a parameter in your code. I have attached a sample workbook that accurately reflects the positioning in my real sheet. Would tremendously appreciate your assistance on doing a couple of modifications for it to be able to run on this new similar sample sheet.
    Attached Files Attached Files

+ 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. [SOLVED] macro to remove rows if all cells from columns are blank except first column
    By tikistat in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-05-2017, 08:08 AM
  2. [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
  3. Hide rows for blank Cells when there is another blank cell below
    By bilich in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-16-2016, 08:29 PM
  4. Hide Rows for First Set of Consecutive Blank Cells in Column
    By pastuslm in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-22-2015, 03:22 PM
  5. [SOLVED] Macro to fill blank cells in column A based on non-blank cells
    By ktalamantez in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-28-2014, 02:47 PM
  6. Macro to delete blank rows if column I is blank for the row
    By tiger10012 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-10-2013, 03:01 PM
  7. [SOLVED] Hide any rows 5 through 16 in which column H is blank
    By Triscia in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-14-2013, 04:30 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