combine hide row macro with conditional formatting

  • Thread starter Thread starter linijini
  • Start date Start date
L

linijini

I'm sure one of you gurus can solve this in a flash. I've recorded a
simple macro to hide a row (Alt O, Alt R, Alt H) but I want it to run
automatically based on a cell value. For example: If cell value "A1"
is "x" then I want the macro to run, and repeat itself down the column
"A2, A3" etcetera until it reaches a blank cell. Is there a way to
plug my existing macro "hiderow" into Conditional Formatting for a
column; or is there a simpler solution?
 
If I understand you correctly, I would simply use the AutoFilter option to
hide rows where a cell in a specific column equals or does not equal a
specific value. This option is under Data, Filter, and AutoFilter.

HTH,
Paul

linijini said:
I'm sure one of you gurus can solve this in a flash. I've recorded a
simple macro to hide a row (Alt O, Alt R, Alt H) but I want it to run
automatically based on a cell value. For example: If cell value "A1"
is "x" then I want the macro to run, and repeat itself down the column
"A2, A3" etcetera until it reaches a blank cell. Is there a way to
plug my existing macro "hiderow" into Conditional Formatting for a
column; or is there a simpler solution?


------------------------------------------------



~~Now Available: Financial Statements.xls, a step by step guide to
creating financial statements
 
something like
for each c in range(cells(1,"a"),cells(activecell.end(xldown).row,"a"))
if ucase(c)= "X" then runit
next

sub runit()

--
Don Guillett
SalesAid Software
(e-mail address removed)
linijini said:
I'm sure one of you gurus can solve this in a flash. I've recorded a
simple macro to hide a row (Alt O, Alt R, Alt H) but I want it to run
automatically based on a cell value. For example: If cell value "A1"
is "x" then I want the macro to run, and repeat itself down the column
"A2, A3" etcetera until it reaches a blank cell. Is there a way to
plug my existing macro "hiderow" into Conditional Formatting for a
column; or is there a simpler solution?


------------------------------------------------



~~Now Available: Financial Statements.xls, a step by step guide to
creating financial statements
 
Don:

Thanks for providing a quick and workable solution. Your help is most
appreciated!

CJ
 
glad to help


--
Don Guillett
SalesAid Software
(e-mail address removed)
linijini said:
Don:

Thanks for providing a quick and workable solution. Your help is most
appreciated!

CJ


------------------------------------------------



~~Now Available: Financial Statements.xls, a step by step guide to
creating financial statements
 

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

Back
Top