Shading of cells

  • Thread starter Thread starter Stephen
  • Start date Start date
S

Stephen

Hi,

A simple question: I have a large spreadsheet which has
multiple input cells scattered all over the spread sheet.
Is there an easy way to color or mark each input cell (i
prefer not to use the comment arrow) without it showing up
on the printed paper? Thanks...
 
Well, you could use create a name for all those special
cells. Insert->Name->Define it would look something
like:
=Sheet1!$A$1, Sheet1!$C$4, etc... depending on what the
cells were.

then you could write some VBA code and put it in the
Workbook module to be triggered by the "BeforePrint" event.

Say you named the special cells as "SpecialRange", the
macro that would take away their special fill color would
go something like this:

With Range("SpecialRange").Interior
.ColorIndex = xlNone
End With

But you'd have to turn the fill back on after you did
this... there isn't an "AfterPrinting" event. But you
could have a macro you could run manually to re-highlight
those cells.

It would look something like:

With Range("SpecialRange").Interior
.ColorIndex = 6
.Pattern = xlSolid
End With

depending on what color or style you wanted these to be,
this might be a bit more complicated. You could even read
what formatting is already there, store it as a variable,
and then recall it when you re-format the cells.

Sorry it isn't so simple, but I hope this helps.
Everett
 
Set up conditional formatting on the entire sheet, which changes
everything to black text on white background when a hidden cell
somewhere changes from 0 to 1. So you can format willy nilly, then
before printing change the cell. In fact you can set up a
worksheet_beforeprint event procedure that changes the cell, prints,
then reverts the cell.

- Jon
 
Back
Top