ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hiding entire rows (https://www.excelbanter.com/excel-programming/395111-hiding-entire-rows.html)

Steve

Hiding entire rows
 
I have a construction contents list, with this list I can order various
items. the rows are quantity - code - description - list - total

what I need to do is to press a command button and hide the rows where the
quantity (column A) = "".
I've tried a number of the examples in the answers already but no joy.
Can anyone help me please.

Thank you all

Steve

Hiding entire rows
 
I forgot to add that I have 501 rows in this list

Thanks

Rick Rothstein \(MVP - VB\)

Hiding entire rows
 
I have a construction contents list, with this list I can order various
items. the rows are quantity - code - description - list - total

what I need to do is to press a command button and hide the rows where the
quantity (column A) = "".
I've tried a number of the examples in the answers already but no joy.


Something like this maybe?

Dim R As Range
For Each R In Range("A1:A501")
If R.Value = "" Then Rows(R.Row).Hidden = True
Next

Change the Range as required.

Rick



All times are GMT +1. The time now is 04:42 PM.

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