Auto-Hide Rows Macro

T

txtstorer

Is it possible to auto hide/unhide rows based on a vlaue that may/may not be
present?

For example, instead of writing many different macros, I would like a macro
to check say column A, and hide every row that has "n/a" as a value in column
A. The values in column A would be based on If Then statements, so they
would change to/from "n/a" depending upon other variables. I would like for
the macroo to continue to monitor and auto hide/unhide actively depending
upon that "n/a" value being present in column A

Any suggestions?

Thank you in advance!
 
J

Jarek Kujawa

select yr data and use this macro

Sub hideem()
For Each cell in Selection
If cell.Value = "n/a" Then
cell.Rows.Entirerow.Hidden = True
End if
Next cell
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top