Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Render the contents of a cell invisible

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Render the contents of a cell invisible

maybe just making the font white?

Sub invisible()
Dim ws As Worksheet
Set ws = Worksheets("Sheet1")
With ws
If .Range("A1") 0 Then
.Range("B1:b5").Font.ColorIndex = 2
Else
.Range("B1:b5").Font.ColorIndex = 0
End If
End With
End Sub

--


Gary


wrote in message
oups.com...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Render the contents of a cell invisible

Hi

That will work if the paper is white, but not if the paper is of any
other color.

Thanks
Satish

Gary Keramidas wrote:
maybe just making the font white?

Sub invisible()
Dim ws As Worksheet
Set ws = Worksheets("Sheet1")
With ws
If .Range("A1") 0 Then
.Range("B1:b5").Font.ColorIndex = 2
Else
.Range("B1:b5").Font.ColorIndex = 0
End If
End With
End Sub

--


Gary


wrote in message
oups.com...
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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 214
Default Render the contents of a cell invisible

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



  #5   Report Post  
Posted to microsoft.public.excel.programming
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




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Render the contents of a cell invisible

Thanks Gary. The problem I have is my printer is a B&W laser printer,
therefore, no matter what the color of the font is, it still prints
black. I actually need the print to be invisible to the printer. If
you have a solution, it would be much appreciated. Thanks.

Michael

Gary Keramidas wrote:
maybe just making the font white?

Sub invisible()
Dim ws As Worksheet
Set ws = Worksheets("Sheet1")
With ws
If .Range("A1") 0 Then
.Range("B1:b5").Font.ColorIndex = 2
Else
.Range("B1:b5").Font.ColorIndex = 0
End If
End With
End Sub

--


Gary


wrote in message
oups.com...
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


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Render the contents of a cell invisible

the other solution is probably better, but when i print a page, nothing in b1:b5
prints on my laser printer.


--


Gary


wrote in message
ps.com...
Thanks Gary. The problem I have is my printer is a B&W laser printer,
therefore, no matter what the color of the font is, it still prints
black. I actually need the print to be invisible to the printer. If
you have a solution, it would be much appreciated. Thanks.

Michael

Gary Keramidas wrote:
maybe just making the font white?

Sub invisible()
Dim ws As Worksheet
Set ws = Worksheets("Sheet1")
With ws
If .Range("A1") 0 Then
.Range("B1:b5").Font.ColorIndex = 2
Else
.Range("B1:b5").Font.ColorIndex = 0
End If
End With
End Sub

--


Gary


wrote in message
oups.com...
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




  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Render the contents of a cell invisible

Michel,

Thank you so much. It works great.

Michael

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find and render text David P. Excel Discussion (Misc queries) 3 May 23rd 09 04:05 AM
Find and render text within IF Function David P. Excel Discussion (Misc queries) 3 May 18th 09 09:40 PM
Getting Excel to render HTML [email protected] Excel Discussion (Misc queries) 0 February 27th 08 08:06 PM
Free pdf creator which can render hyperlinks? Bob Smith Excel Worksheet Functions 2 December 31st 06 02:44 PM
Invisible Contents Jeff Excel Programming 1 April 14th 04 11:48 PM


All times are GMT +1. The time now is 10:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"