Worksheet Change event code, but retain Undo?
Conditional formatting can be dependant on whatever you want it to be. Change
from cell value to Formula and go to town with it...
=or(f33<f39,f34<f40)
Is a perfectly valid conditional format in any cell you want to put it...
To answer your other question code execution wipes out the undo and there is
no way around it...
--
HTH...
Jim Thomlinson
"mark" wrote:
Hi.
A team here wanted some formatting, dependent upon 4 other cells, in an OR
formula.
if =or(f33<f39,f34<f40) is true, they want cell f1 to have a red background.
If it's false, it has the default blue background.
Since conditional formatting is only dependent upon the value of the cell to
which the cell is being applied, the way I saw to do this was with some
custom code.
I put some code into the worksheet_change event which does the formatting
fine.
But, now the Undo button is not available... running the custom code takes
away the possibility of Undo. (no particular surprise).
Is there a way to have both?
Thanks,
Mark
|