Hiding columns across merged cells

G

Guest

From Excel, I can hide a single column even if it crosses merged cells,
without hiding all of the cells included in the merged set of cells. If I
hide the column with a macro, all of the columns in the merged set of cells
are hidden. How can I get the single column to be hidden without a lot of
unmerging and remerging of cells?
 
D

David Lloyd

One alternative is to set the ColumnWidth property to zero. For example:

Columns("B:B").ColumnWidth = 0

If you want to unhide the column, you can resort back to the Hidden
property, or change the ColumnWidth property again.

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


From Excel, I can hide a single column even if it crosses merged cells,
without hiding all of the cells included in the merged set of cells. If I
hide the column with a macro, all of the columns in the merged set of cells
are hidden. How can I get the single column to be hidden without a lot of
unmerging and remerging of cells?
 
P

Pat Hartman\(MVP\)

Tables are not spreadsheets. They do not have cells and they work nothing
like spreadsheets. It's time to put on your relational database hat and use
database techniques to control the view of data rather than spreadsheet
techniques. One thing that seems to cause a lot of confusion is the fact
that in a spreadsheet the data and presentation layers are combined. That
means that the format of a spreadsheet dictates how data is stored. With a
database, data and presentation are completely separate. Tables store data.
Forms and reports display it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top