Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 02-12-2018, 05:10 PM
NoSparks NoSparks is offline How to hide rows that have no data but has formula in cells? Windows 7 64bit How to hide rows that have no data but has formula in cells? Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

If any cell within your data area is blank, this will hide that row.
Code:
Sub HideRowsMissingData()

    Dim cl As Range, i As Integer
        
Application.ScreenUpdating = False
With Sheets("AutoFill")
    For Each cl In .Range("B6:B500")
        If cl.Value = "" Then
            .Rows(cl.Row).Hidden = True
        Else
            For i = 1 To 4
                If cl.Offset(, i).Value = "" Then
                    .Rows(cl.Row).Hidden = True
                    Exit For
                End If
            Next i
        End If
    Next cl
End With
Application.ScreenUpdating = True
End Sub
and this will un-hide all hidden rows
Code:
Sub UnHideRows()
Sheets("AutoFill").Rows.EntireRow.Hidden = False
End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Split data in cells and duplicate rows ballpoint Excel Programming 6 02-07-2018 05:52 PM
eliminating blan rows between cells in a column cantaining data FUGMAN Excel Programming 6 03-01-2017 07:35 AM
Formula to hide '0' from blank referenced cells formuladummy Excel 3 05-08-2014 02:33 AM
Hide Rows YounesB3 Excel 2 10-29-2012 05:40 AM
How to hide rows that have no data but has formula in cells? Sum Formula in the range with Numeric and NonNumeric data cells Spanec Excel 2 01-12-2012 09:15 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:25 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft