ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Want to auto hide rows in excel when no data in a certain column. (https://www.excelbanter.com/excel-discussion-misc-queries/33037-want-auto-hide-rows-excel-when-no-data-certain-column.html)

Tim

Want to auto hide rows in excel when no data in a certain column.
 
I have a group of spreadsheets that use form 5 to 50 rows. I want to hide
the blank rows when I have less than the 50. However, there is formulas in
the row so I want to base the hiding on 1 column where I input the initial
data.

JasperBlaas


By selection the whole dataset (including headers) and selecting Data
Filter Autofilter. Then click the small arrow on the colomn that has
you want to base the hiding on and customize it.


--
JasperBlaas
------------------------------------------------------------------------
JasperBlaas's Profile: http://www.excelforum.com/member.php...o&userid=12615
View this thread: http://www.excelforum.com/showthread...hreadid=383198


Tim

looking for some way to automate. possibly VB?

"JasperBlaas" wrote:


By selection the whole dataset (including headers) and selecting Data
Filter Autofilter. Then click the small arrow on the colomn that has
you want to base the hiding on and customize it.


--
JasperBlaas
------------------------------------------------------------------------
JasperBlaas's Profile: http://www.excelforum.com/member.php...o&userid=12615
View this thread: http://www.excelforum.com/showthread...hreadid=383198



Dave Peterson

I like the autofilter, too. It's easy to use and easy to explain how to turn it
on/off.

But if you need a macro:

Option Explicit
Sub testme()

Dim myRng As Range
Dim myCell As Range

With Worksheets("Sheet1")
Set myRng = .Range("a5:A54")

For Each myCell In myRng.Cells
myCell.EntireRow.Hidden = CBool(myCell.Value = "")
Next myCell
End With
End Sub



Tim wrote:

I have a group of spreadsheets that use form 5 to 50 rows. I want to hide
the blank rows when I have less than the 50. However, there is formulas in
the row so I want to base the hiding on 1 column where I input the initial
data.


--

Dave Peterson


All times are GMT +1. The time now is 11:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com