ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   hiding rows (https://www.excelbanter.com/excel-programming/364971-re-hiding-rows.html)

crazybass2

hiding rows
 
Gina,

What do you mean by 'row K.' K is a column.

Mike

"Gina" wrote:

Hi,

I want to hide all the rows containing data, below row K, when I click on a
checkbox. Does anyone know how to do this?

Thanks


Gina

hiding rows
 
Mike,

Yeah, sorry you're right. What I want to do is hide rows, starting at row
24 going down the sheet, that contain data. The number of rows containing
data is unknown so I would like to use a macro that somehow selects only the
rows that aren't blank so that I can hide them.



"crazybass2" wrote:

Gina,

What do you mean by 'row K.' K is a column.

Mike

"Gina" wrote:

Hi,

I want to hide all the rows containing data, below row K, when I click on a
checkbox. Does anyone know how to do this?

Thanks


crazybass2

hiding rows
 
Gina,

The following code will hide all rows with data starting with row 24. NOTE
- This code will hide any row (starting with row 24) with data in it,
regardless of what column the data is in.

Sub HideData()
For Each rw In Range("24:65536").Rows
If Application.WorksheetFunction.CountBlank(rw) < 256 Then rw.Hidden = True
Next
End Sub

Mike


"Gina" wrote:

Mike,

Yeah, sorry you're right. What I want to do is hide rows, starting at row
24 going down the sheet, that contain data. The number of rows containing
data is unknown so I would like to use a macro that somehow selects only the
rows that aren't blank so that I can hide them.



"crazybass2" wrote:

Gina,

What do you mean by 'row K.' K is a column.

Mike

"Gina" wrote:

Hi,

I want to hide all the rows containing data, below row K, when I click on a
checkbox. Does anyone know how to do this?

Thanks



All times are GMT +1. The time now is 08:04 AM.

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