View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick[_2_] Bernie Deitrick[_2_] is offline
external usenet poster
 
Posts: 176
Default Cell comparison to change color on a third cell.

Kathryn,

Conditional formatting cannot remember previous values, so cannot be
used solely to highlight changes. You need to use the change event
code to change the color of the cell or, at least, to store the old
value in another cell for comparison purposes when applying
conditional formatting.

HTH,
Bernie


"Kathryn" wrote in message
...
Hi Bernie/Dannic - could I ask a follow on question?

Can you get a cell color to change if the value in the
cell is changed? For example, if the value in cell A1 is
10 and a user changes it to any other number, could the
fill color be changed automatically (say from yellow to
blue)? I only want this to happen on selected cells
(maybe a dozen or so).

I'm currently using code to do this but it seems like your
way might be a lot simpler!

Thanks! Kathryn

-----Original Message-----
Dannic,

No programming needed.

With the nominal value in A1, the percentage (entered as

a percentage)
in B1, use Format | Conditional formatting... on cell

C1, selecting
"Formula Is" with the formula

=OR(C1A1*(1+B1),C1<A1*(1-B1))

Set your formatting pattern to the color of your choice

--
HTH,
Bernie


"Dannic" wrote in message
. com...
I have a "template" of sorts. Basicly it has several

columns. One
column has the nominal value. The next has a

percentage value and
the
third is where the data taken is inserted.

What I would like to do is Take the first value. Find

the upper and
lower limits per the second value. Compare those

limits to the
third
value and if it is out of the range of the limits

change the color
of
the cell or circle the cell.

I'm not all that familiar with Excel programming and

any help would
be
appreciated.

Thanks

Dannic
Http://www.orpgs.com



.