Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Applications / Excel / November 2007



Tip: Looking for answers? Try searching our database.

How exactly does Excel "hide" columns?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tdsg - 28 Nov 2007 09:21 GMT
Can anyone confirm how Excel (2004 for Mac; Version 11.3.7) actually
hides columns and rows?
1. I suspect, but cannot confirm that it does so by reducing their
width (columns) or their height (rows) to zero.
2. By whatever means it does so, is it possible to access the "Hide"
function by straightforward programming, such as "conditional
formatting" or something similar?
PhilD - 28 Nov 2007 15:37 GMT
> 1. I suspect, but cannot confirm that it does so by reducing their
> width (columns) or their height (rows) to zero.

That looks about right, in that you can "hide" a row or column by
making it zero height/width.  It just doesn't bother to display
whatever you've hidden (but of course it is still there functionally,
so you can hide sensitive formulae if necessary).

As regards the rest of your question, an expert will come along
shortly... (I hope!)

PhilD

--
<><
JE McGimpsey - 28 Nov 2007 17:57 GMT
In article
<1a55582f-145b-4753-acaa-e1a2cfb53a01@e25g2000prg.googlegroups.com>,

> Can anyone confirm how Excel (2004 for Mac; Version 11.3.7) actually
> hides columns and rows?
> 1. I suspect, but cannot confirm that it does so by reducing their
> width (columns) or their height (rows) to zero.

In the Excel Document Object Model (DOM), setting a range's Hidden
property (e.g, in VBA: Columns(1).Hidden = True) produces the same
result as setting the range's ColumnWidth property to 0.

> By whatever means it does so, is it possible to access the "Hide"
> function by straightforward programming, such as "conditional
> formatting" or something similar?

Formatting, including conditional formatting, cannot change environment
variables like Height and Width.

It's easy, though to use a Event macro to change those settings. For
instance, if you want to hide a row if the value in column A is zero,
put this in your Worksheet code module (CTRL-click the worksheet tab and
choose View Code):

   Private Sub Worksheet_Change(ByVal Target As Excel.Range)
       Dim rCell As Range
       Application.ScreenUpdating = False
       For Each rCell In Range("A1:A" & _
                 Range("A" & Rows.Count).End(xlUp).Row)
           With rCell
               If IsNumeric(.Value) Then .EntireRow.Hidden = .Value = 0
           End With
       Next rCell
       Application.ScreenUpdating = True
   End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.