ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA for Hiding Rows with Errors (https://www.excelbanter.com/excel-programming/377776-vba-hiding-rows-errors.html)

Wynn

VBA for Hiding Rows with Errors
 
Only have basic VBA knowledge and was hoping you guys could help me here. I
want some code to hide all rows that have errors (i.e. REF, div/0, etc.)

I figure this should be pretty easy but haven´t quite gotten it right....


Dave Peterson

VBA for Hiding Rows with Errors
 
One way is to select the range to examine.
edit|goto|special
check Formulas (or Constants)
uncheck everything except errors
Then Format|row|hide

If you need a macro, then record one when you do it manually.

Wynn wrote:

Only have basic VBA knowledge and was hoping you guys could help me here. I
want some code to hide all rows that have errors (i.e. REF, div/0, etc.)

I figure this should be pretty easy but haven´t quite gotten it right....


--

Dave Peterson

Wynn

VBA for Hiding Rows with Errors
 
Great. Got it to do what I wanted. Thanks a lot. One more thing...is there a
way to use goto to select all rows with a given value (i.e. all of the cells
in a column that are equal to zero)?

"Dave Peterson" wrote:

One way is to select the range to examine.
edit|goto|special
check Formulas (or Constants)
uncheck everything except errors
Then Format|row|hide

If you need a macro, then record one when you do it manually.

Wynn wrote:

Only have basic VBA knowledge and was hoping you guys could help me here. I
want some code to hide all rows that have errors (i.e. REF, div/0, etc.)

I figure this should be pretty easy but haven´t quite gotten it right....


--

Dave Peterson


Dave Peterson

VBA for Hiding Rows with Errors
 
Maybe you don't have to select them???

Could you apply data|filter|autofilter to just see the rows with 0's?

Then you could manipulate that visible data the way you want.

Wynn wrote:

Great. Got it to do what I wanted. Thanks a lot. One more thing...is there a
way to use goto to select all rows with a given value (i.e. all of the cells
in a column that are equal to zero)?

"Dave Peterson" wrote:

One way is to select the range to examine.
edit|goto|special
check Formulas (or Constants)
uncheck everything except errors
Then Format|row|hide

If you need a macro, then record one when you do it manually.

Wynn wrote:

Only have basic VBA knowledge and was hoping you guys could help me here. I
want some code to hide all rows that have errors (i.e. REF, div/0, etc.)

I figure this should be pretty easy but haven´t quite gotten it right....


--

Dave Peterson


--

Dave Peterson


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

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