ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   newbie question (https://www.excelbanter.com/excel-programming/373716-newbie-question.html)

Steve Squires

newbie question
 
Hi guys, hope you can help
I got a strange request, is it possible to change the color of a value
in an input cell after a value has been entered, based on a simple
subtraction formula?
Let me make that clearer, If I had two columns a1 and b1, and I type a
value of 18 into cell a1, then a value of 10 into cell b1, is it
possible to change the color of the value in cell b1 to red
"on-the-fly", based on the fact that it is a smaller value than a1?
(If the value of b1 was to be 19 then the color would remain black,
because it is greater than 18)
If not, is it possible to create a macro or script button that I can
press afterwards to calculate and change the color for me?
Thanks guys
Steve


Anthony D

newbie question
 
Hi Steve,

Yes, if you have selected cell b1, under the Format menu items there is
Conditional Formatting... .
The condition (condition 1) is:
Cell Value Is less than =$a$1
and with the Format... button, the appropriate cell shading (e.g. red) can
be selected on the Patterns tab.
Changing b1 from 19 to 10 will activate the shading (a bright shading tends
to mask the cell value but there are several lighter shadings)

Anthony

"Steve Squires" wrote:

Hi guys, hope you can help
I got a strange request, is it possible to change the color of a value
in an input cell after a value has been entered, based on a simple
subtraction formula?
Let me make that clearer, If I had two columns a1 and b1, and I type a
value of 18 into cell a1, then a value of 10 into cell b1, is it
possible to change the color of the value in cell b1 to red
"on-the-fly", based on the fact that it is a smaller value than a1?
(If the value of b1 was to be 19 then the color would remain black,
because it is greater than 18)
If not, is it possible to create a macro or script button that I can
press afterwards to calculate and change the color for me?
Thanks guys
Steve



Don Guillett

newbie question
 
formatconditional formatleft windowformula isright window =b1<a1format
as desired

--
Don Guillett
SalesAid Software

"Steve Squires" wrote in message
...
Hi guys, hope you can help
I got a strange request, is it possible to change the color of a value
in an input cell after a value has been entered, based on a simple
subtraction formula?
Let me make that clearer, If I had two columns a1 and b1, and I type a
value of 18 into cell a1, then a value of 10 into cell b1, is it
possible to change the color of the value in cell b1 to red
"on-the-fly", based on the fact that it is a smaller value than a1?
(If the value of b1 was to be 19 then the color would remain black,
because it is greater than 18)
If not, is it possible to create a macro or script button that I can
press afterwards to calculate and change the color for me?
Thanks guys
Steve




Anthony D

newbie question
 
ps. should have mentioned that the font colour can be set as well (or
instead) to red using the Font tab instead of (or as well as) the Patterns
tab in the Conditional Formatting.

Anthony

"Steve Squires" wrote:

Hi guys, hope you can help
I got a strange request, is it possible to change the color of a value
in an input cell after a value has been entered, based on a simple
subtraction formula?
Let me make that clearer, If I had two columns a1 and b1, and I type a
value of 18 into cell a1, then a value of 10 into cell b1, is it
possible to change the color of the value in cell b1 to red
"on-the-fly", based on the fact that it is a smaller value than a1?
(If the value of b1 was to be 19 then the color would remain black,
because it is greater than 18)
If not, is it possible to create a macro or script button that I can
press afterwards to calculate and change the color for me?
Thanks guys
Steve



Steve Squires

newbie question-Thank You
 
Thanks for your help guys, this works a treat, I really appreciate
your replies. I was a bit stuck on that one...

Steve

On Tue, 26 Sep 2006 05:35:01 -0700, Anthony D
wrote:

ps. should have mentioned that the font colour can be set as well (or
instead) to red using the Font tab instead of (or as well as) the Patterns
tab in the Conditional Formatting.

Anthony

"Steve Squires" wrote:

Hi guys, hope you can help
I got a strange request, is it possible to change the color of a value
in an input cell after a value has been entered, based on a simple
subtraction formula?
Let me make that clearer, If I had two columns a1 and b1, and I type a
value of 18 into cell a1, then a value of 10 into cell b1, is it
possible to change the color of the value in cell b1 to red
"on-the-fly", based on the fact that it is a smaller value than a1?
(If the value of b1 was to be 19 then the color would remain black,
because it is greater than 18)
If not, is it possible to create a macro or script button that I can
press afterwards to calculate and change the color for me?
Thanks guys
Steve





All times are GMT +1. The time now is 05:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com