ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   hiding rows with a macro (https://www.excelbanter.com/excel-programming/338531-hiding-rows-macro.html)

lee

hiding rows with a macro
 
I haven't done any kind of programming in about 5 years. What I want to do
is, have a IF function in cell "A1" that checks if "C1" has anything < than
0. If it is < 0 leave row1 visable, if it =0 then hide row1. I need to do
this for about 20 rows, if later data is entered in "C1" thru "C20"it would
automatically Hide or unhide the rows.

is this possible?

Ian

hiding rows with a macro
 
I don't think you can do it in a cell, but you could do it with VBA.
I see a possible flaw in your arrangement. You say you want to automatically
hide or unhide rows depending on the value of a cell in that row. If the row
is hidden, you would not be able to edit the data, so you would never be in
a position where the row needs to be unhidden.

--
Ian
--
"Lee" wrote in message
...
I haven't done any kind of programming in about 5 years. What I want to do
is, have a IF function in cell "A1" that checks if "C1" has anything <
than
0. If it is < 0 leave row1 visable, if it =0 then hide row1. I need to do
this for about 20 rows, if later data is entered in "C1" thru "C20"it
would
automatically Hide or unhide the rows.

is this possible?




JE McGimpsey

hiding rows with a macro
 
There are innumerable answers in the archives:

http://groups.google.com/advanced_gr...ugroup=*excel*

But I've got a question for you: If row 1 is hidden, how will the user
enter anything in Row 1? Yes, it can be done, but it's hardly user
friendly.

In article ,
Lee wrote:

I haven't done any kind of programming in about 5 years. What I want to do
is, have a IF function in cell "A1" that checks if "C1" has anything < than
0. If it is < 0 leave row1 visable, if it =0 then hide row1. I need to do
this for about 20 rows, if later data is entered in "C1" thru "C20"it would
automatically Hide or unhide the rows.


lee

hiding rows with a macro
 
I forgot to mention that the information in Cell "C1" is coming from another
sheet


"JE McGimpsey" wrote:

There are innumerable answers in the archives:

http://groups.google.com/advanced_gr...ugroup=*excel*

But I've got a question for you: If row 1 is hidden, how will the user
enter anything in Row 1? Yes, it can be done, but it's hardly user
friendly.

In article ,
Lee wrote:

I haven't done any kind of programming in about 5 years. What I want to do
is, have a IF function in cell "A1" that checks if "C1" has anything < than
0. If it is < 0 leave row1 visable, if it =0 then hide row1. I need to do
this for about 20 rows, if later data is entered in "C1" thru "C20"it would
automatically Hide or unhide the rows.




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

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