hiding data

cgriff

Board Regular
Joined
Aug 26, 2002
Messages
201
what a am trying to to do is hide a range of data
if a1=false hide b6:c23

Thanks in advance
This message was edited by cgriff on 2002-10-05 14:29
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Hi
I'm not sure if you can hide a select range of data though you can hide formulas. You may, however, hide complete rows or columns.
This little procedure will hide columns B & C if the value in A1 is false and show the columns if the value in A1 is true.
Right-Click on your worksheet tab choose "view code", and paste the following as is:
<pre>
Private Sub Worksheet_Change(ByVal Target As Range)
If Not TypeName([A1].Value) = "Boolean" Then _
Exit Sub Else: Columns("B:C").EntireColumn.Hidden = Not [A1].Value
End Sub

</pre>
Tom
 
Upvote 0
On 2002-10-05 14:02, cgriff wrote:
what a am trying to to do is hide a range of data
if a1=false hide b6:c23

Thanks in advance

Hello,

What about using conditional format?
1. Select the cells you wanna hide
2. from the menubar select Format|Conditional format
3. enter formula =A1=FALSE
4. select format: set textcolor to equal backgroundcolor
 
Upvote 0
On 2002-10-05 14:02, cgriff wrote:
what a am trying to to do is hide a range of data
if a1=false hide b6:c23

Thanks in advance
This message was edited by cgriff on 2002-10-05 14:29

Hi cgriff:

I can't say if this is a viable option for you ... but

You can CUSTOM FORMAT the entries you intend to hide as ;;;

Regards!

Yogi
This message was edited by Yogi Anand on 2002-10-08 16:21
 
Upvote 0

Forum statistics

Threads
1,207,170
Messages
6,076,914
Members
446,241
Latest member
Nhacai888b

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top