close

How can I set up my worksheets so that rows that are hidden will be shaded in
if they are unhidden?

TJ,

Set the cell shading for the rows before hiding them. If they're
subsequently unhidden, the shading will be there.I was hoping for some type of conditional formatting or code that would
automate this for me.

quot;Mark Lincolnquot; wrote:

gt; TJ,
gt;
gt; Set the cell shading for the rows before hiding them. If they're
gt; subsequently unhidden, the shading will be there.
gt;
gt;

TJ,

If they are hidden using hide rather than filters, then a macro like this
will shade the hidden rows:

Sub NewSub()
Application.ScreenUpdating = False
Cells.Interior.ColorIndex = 3
Cells.SpecialCells(xlCellTypeVisible).Interior.Col orIndex = xlNone
End Sub

HTH,
Bernie
MS Excel MVPquot;TJquot; gt; wrote in message
...
gt; How can I set up my worksheets so that rows that are hidden will be shaded
gt; in
gt; if they are unhidden?
That is the effect I want. How can I make it so that when I hide the cells
they are shaded without me having to run the macro every time I hide cells?
I would like to have the act of hiding the cells trigger the shading.

quot;Bernie Deitrickquot; wrote:

gt; TJ,
gt;
gt; If they are hidden using hide rather than filters, then a macro like this
gt; will shade the hidden rows:
gt;
gt; Sub NewSub()
gt; Application.ScreenUpdating = False
gt; Cells.Interior.ColorIndex = 3
gt; Cells.SpecialCells(xlCellTypeVisible).Interior.Col orIndex = xlNone
gt; End Sub
gt;
gt; HTH,
gt; Bernie
gt; MS Excel MVP
gt;
gt;
gt; quot;TJquot; gt; wrote in message
gt; ...
gt; gt; How can I set up my worksheets so that rows that are hidden will be shaded
gt; gt; in
gt; gt; if they are unhidden?
gt;
gt;
gt;

TJ,

Sorry, there is no event that Excel can use to tell when you hide a row, so
once you've hidden the rows, you need to manually run the macro.

Berniequot;TJquot; gt; wrote in message
...
gt; That is the effect I want. How can I make it so that when I hide the
gt; cells
gt; they are shaded without me having to run the macro every time I hide
gt; cells?
gt; I would like to have the act of hiding the cells trigger the shading.
gt;
gt; quot;Bernie Deitrickquot; wrote:
gt;
gt;gt; TJ,
gt;gt;
gt;gt; If they are hidden using hide rather than filters, then a macro like this
gt;gt; will shade the hidden rows:
gt;gt;
gt;gt; Sub NewSub()
gt;gt; Application.ScreenUpdating = False
gt;gt; Cells.Interior.ColorIndex = 3
gt;gt; Cells.SpecialCells(xlCellTypeVisible).Interior.Col orIndex = xlNone
gt;gt; End Sub
gt;gt;
gt;gt; HTH,
gt;gt; Bernie
gt;gt; MS Excel MVP
gt;gt;
gt;gt;
gt;gt; quot;TJquot; gt; wrote in message
gt;gt; ...
gt;gt; gt; How can I set up my worksheets so that rows that are hidden will be
gt;gt; gt; shaded
gt;gt; gt; in
gt;gt; gt; if they are unhidden?
gt;gt;
gt;gt;
gt;gt;
Bernie, might TJ be able to highlight the rows to hide and then run a
macro to both shade and hide them? That would probably be the closest
thing to want he'd like to do.

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()