ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA Help - Hiding Rows (https://www.excelbanter.com/excel-programming/288853-vba-help-hiding-rows.html)

cmoreno

VBA Help - Hiding Rows
 
Hi there,

I really need some help. I'm trying to write some pretty basic VB
code, but I'm having trouble getting it to work. Here's the setup:

I have a column that spits out the word "HIDE" in a cell if I want the
entire row to be hidden. Now I'm trying to write a macro which
automates the hiding process. Any help you can give will be much
appreciated.

Thanks!


---
Message posted from http://www.ExcelForum.com/


acw[_2_]

VBA Help - Hiding Rows
 
Hi

Build some loop that will cycle through the cells in the column (for, while - depends on how you want to determine the range of cells to check). The following will hide the row.
If ActiveCell = "HIDE" Then Rows(ActiveCell.Row).EntireRow.Hidden = True

Tony

----- cmoreno wrote: -----

Hi there,

I really need some help. I'm trying to write some pretty basic VB
code, but I'm having trouble getting it to work. Here's the setup:

I have a column that spits out the word "HIDE" in a cell if I want the
entire row to be hidden. Now I'm trying to write a macro which
automates the hiding process. Any help you can give will be much
appreciated.

Thanks!


---
Message posted from http://www.ExcelForum.com/




All times are GMT +1. The time now is 07:29 PM.

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