View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
[email protected] mrlanier@hotmail.com is offline
external usenet poster
 
Posts: 63
Default Render the contents of a cell invisible

Michel,

Thanks for your response. It works great with one exception. I need
to assign A1 two different values: A1=1 and A11. With your macro,
when I enter 1, the contents of range B1:B5 does exactly what I had
asked for. However, when I delete the contents of A1 or change the
value to something other than 1, I cannot recall the contents of range
B1:B5, which is something I need to do. Do you have a solution?
Thanks.

Michael


Michel Pierron wrote:
Hi Michael,

Sub Invisible()
With Worksheets(1)
.Range("B1:B5").NumberFormat = IIf(.Range("A1") < "", ";;;", "General")
End With
End Sub

MP

a écrit dans le message de news:
...
Is there a macro that can render the contents of a cell invisible to
both view and to the printer? For example, if cell A10, then the
contents of range B1:B5 are rendered invisible. The formulas and their
returns cannot be altered or made null due to their applications in
other cells. Thanks.

Michael