K
Keith
We had to do this quickly yesterday (XL2003), and ended up doing it manually
(ugh) but I have to believe there is a better way...
Starting with a worksheet that has cells color-coded manually (each cell
background color) as either light blue, dark blue, or green
Then added a conditional format in one cell (to test and make sure it was
working properly) with three conditions, which either leave the cell the
original color (light blue, dark blue, green) or changes it (three
conditions) to yellow, orange, or red based on the contents of that cell and
other cells. The conditional formatting uses relative and fixed cell
references (for example, in cell D17 one condition was =AND($B17 = $A$1, D17
<> "M")
I then wanted to copy the conditional formatting /only/ to the rest of the
cells in the target range, so that the relative cell reference (D17) will
update to whatever cell the conditional formula is pasted to (e.g. paste in
E17 it becomes =AND($B17 = $A$1, E17 <> "M").
However, when I copy/paste special/format, it also copies the original cell
color.
In the end, to get the work done, we manually re-colored the grid after
pasting the conditional formatting in all cells. I've got to believe there
is some way (without a bunch of VBA) to expand conditional formatting to a
range of cells without also copying the underlying cell color, but while we
were trying to find a way yesterday I wasn't able to find anything...
Many thanks,
Keith
(ugh) but I have to believe there is a better way...
Starting with a worksheet that has cells color-coded manually (each cell
background color) as either light blue, dark blue, or green
Then added a conditional format in one cell (to test and make sure it was
working properly) with three conditions, which either leave the cell the
original color (light blue, dark blue, green) or changes it (three
conditions) to yellow, orange, or red based on the contents of that cell and
other cells. The conditional formatting uses relative and fixed cell
references (for example, in cell D17 one condition was =AND($B17 = $A$1, D17
<> "M")
I then wanted to copy the conditional formatting /only/ to the rest of the
cells in the target range, so that the relative cell reference (D17) will
update to whatever cell the conditional formula is pasted to (e.g. paste in
E17 it becomes =AND($B17 = $A$1, E17 <> "M").
However, when I copy/paste special/format, it also copies the original cell
color.
In the end, to get the work done, we manually re-colored the grid after
pasting the conditional formatting in all cells. I've got to believe there
is some way (without a bunch of VBA) to expand conditional formatting to a
range of cells without also copying the underlying cell color, but while we
were trying to find a way yesterday I wasn't able to find anything...
Many thanks,
Keith