Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Rose Howard   on Dec 23 In MS Office Category.

  
Question Answered By: Stacy Cunningham   on Dec 23

There are two different modes - debug and design - that would have similar
effects. If you save (and close) while either is active, they will be gone
when you start the sheet  next time, and it will be back to normal. (Excel
2003 and earlier, anyway.)

==================================================

There is no "overrides" between conditional formatting and macros. The fact
that a macro impacts a cell is not known to Excel until the macro is
actually running and actually changes that cell. Conditional formatting
_is_ associated with a cell and is always going to be active. I.e. if a
macro changes a cell (and assuming display  updating is not turned off), then
any conditional formatting on that cell will influence its display.

Of course, a macro can remove or replace the conditional formatting
instructions for a cell - just as it can do anything else. In that case,
the old conditional formatting instructions would be gone.

==================================================

What your professor said sounds incorrect. But ...

> I am starting to think the conditional format overrides any formats set  by
> macros.

... is also incorrect.

A cell can be thought of as having two distinct attributes: its value and
its format specification. The value decides what is displayed, and the
format specification decides what it looks like. The format specification
always includes "normal" formatting and sometimes includes conditional
formatting. (This is very simplistic - there are lots of attributes
really - but this is the principle.)

To display a cell, you give it a format specification and a value, and
_Excel_ displays it. Your macro or your typing doesn't display the cell,
Excel does - based on the current value and format specification.

BUT. A macro can put a value into a cell, and it can put a format
specification into a cell. These overwrite whatever was there before. And
Excel will display the cell again, according to its new attributes.

So ... there is no concept of overrides or precedence. A cell is displayed
according to its current attributes only. Conditional formatting on a cell
will be active until the conditional formatting specification itself is
removed or replaced (either by a macro or by you).

Share: 

 

This Question has 5 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Macros randomly stopping? Surely not. Or get search suggestion and latest updates.


Tagged: