close

In sheet1, A1 value = 10, B1 value = 5 (both vary, sum of numbers on another
sheet)

I would like to have another cell (we'll call it Difference) that determines
which is greater (A1 or B1) and if A1 is greater, then color this result in
red and calculate A1-B1. However, if B1 is greater, keep the default color
and calculate B1-A1.

Is this possible with function(s)?

Don
Don, in two steps, for the color change, format conditional formatting,
formula is =$A$1gt;$B$1, pick the format you want, for the calculation part
=IF(A1gt;B1,A1-B1,B1-A1)

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 amp; 2003

quot;Donquot; gt; wrote in message
...
gt; In sheet1, A1 value = 10, B1 value = 5 (both vary, sum of numbers on
another
gt; sheet)
gt;
gt; I would like to have another cell (we'll call it Difference) that
determines
gt; which is greater (A1 or B1) and if A1 is greater, then color this result
in
gt; red and calculate A1-B1. However, if B1 is greater, keep the default color
gt; and calculate B1-A1.
gt;
gt; Is this possible with function(s)?
gt;
gt; Don
gt;
gt;
Paul,

Yes, I understand and know about the calculation......but, what I don't know
is if the A1 gt;B1, how can I tie changing the value color (not the cell
background) to a different color, in this case red, within the SAME cell
function? And, what is that function?

Thanks,
Don
quot;Paul Bquot; gt; wrote in message
...
gt; Don, in two steps, for the color change, format conditional formatting,
gt; formula is =$A$1gt;$B$1, pick the format you want, for the calculation part
gt; =IF(A1gt;B1,A1-B1,B1-A1)
gt;
gt; --
gt; Paul B
gt; Always backup your data before trying something new
gt; Please post any response to the newsgroups so others can benefit from it
gt; Feedback on answers is always appreciated!
gt; Using Excel 2002 amp; 2003
gt;
gt; quot;Donquot; gt; wrote in message
gt; ...
gt;gt; In sheet1, A1 value = 10, B1 value = 5 (both vary, sum of numbers on
gt; another
gt;gt; sheet)
gt;gt;
gt;gt; I would like to have another cell (we'll call it Difference) that
gt; determines
gt;gt; which is greater (A1 or B1) and if A1 is greater, then color this result
gt; in
gt;gt; red and calculate A1-B1. However, if B1 is greater, keep the default
gt;gt; color
gt;gt; and calculate B1-A1.
gt;gt;
gt;gt; Is this possible with function(s)?
gt;gt;
gt;gt; Don
gt;gt;
gt;gt;
gt;
gt;
Don, a function can not change the font color but you can use conditional
formatting to change that cell, select the quot;value cellquot; and click on format,
conditional formatting, change cell valve is to formula is and put in
=$A$1gt;$B$1, click on format, font, color, pick red, OK, OK now when A1gt;B1
your quot;value cellquot; will change to red font.

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 amp; 2003

quot;Donquot; gt; wrote in message
...
gt; Paul,
gt;
gt; Yes, I understand and know about the calculation......but, what I don't
know
gt; is if the A1 gt;B1, how can I tie changing the value color (not the cell
gt; background) to a different color, in this case red, within the SAME cell
gt; function? And, what is that function?
gt;
gt; Thanks,
gt; Don
gt; quot;Paul Bquot; gt; wrote in message
gt; ...
gt; gt; Don, in two steps, for the color change, format conditional formatting,
gt; gt; formula is =$A$1gt;$B$1, pick the format you want, for the calculation
part
gt; gt; =IF(A1gt;B1,A1-B1,B1-A1)
gt; gt;
gt; gt; --
gt; gt; Paul B
gt; gt; Always backup your data before trying something new
gt; gt; Please post any response to the newsgroups so others can benefit from it
gt; gt; Feedback on answers is always appreciated!
gt; gt; Using Excel 2002 amp; 2003
gt; gt;
gt; gt; quot;Donquot; gt; wrote in message
gt; gt; ...
gt; gt;gt; In sheet1, A1 value = 10, B1 value = 5 (both vary, sum of numbers on
gt; gt; another
gt; gt;gt; sheet)
gt; gt;gt;
gt; gt;gt; I would like to have another cell (we'll call it Difference) that
gt; gt; determines
gt; gt;gt; which is greater (A1 or B1) and if A1 is greater, then color this
result
gt; gt; in
gt; gt;gt; red and calculate A1-B1. However, if B1 is greater, keep the default
gt; gt;gt; color
gt; gt;gt; and calculate B1-A1.
gt; gt;gt;
gt; gt;gt; Is this possible with function(s)?
gt; gt;gt;
gt; gt;gt; Don
gt; gt;gt;
gt; gt;gt;
gt; gt;
gt; gt;
gt;
gt;
That's what I needed....had forgotten this little feature....thanks so much
Paul.

Don
quot;Paul Bquot; gt; wrote in message
...
gt; Don, a function can not change the font color but you can use conditional
gt; formatting to change that cell, select the quot;value cellquot; and click on
gt; format,
gt; conditional formatting, change cell valve is to formula is and put in
gt; =$A$1gt;$B$1, click on format, font, color, pick red, OK, OK now when A1gt;B1
gt; your quot;value cellquot; will change to red font.
gt;
gt; --
gt; Paul B
gt; Always backup your data before trying something new
gt; Please post any response to the newsgroups so others can benefit from it
gt; Feedback on answers is always appreciated!
gt; Using Excel 2002 amp; 2003
gt;
gt; quot;Donquot; gt; wrote in message
gt; ...
gt;gt; Paul,
gt;gt;
gt;gt; Yes, I understand and know about the calculation......but, what I don't
gt; know
gt;gt; is if the A1 gt;B1, how can I tie changing the value color (not the cell
gt;gt; background) to a different color, in this case red, within the SAME cell
gt;gt; function? And, what is that function?
gt;gt;
gt;gt; Thanks,
gt;gt; Don
gt;gt; quot;Paul Bquot; gt; wrote in message
gt;gt; ...
gt;gt; gt; Don, in two steps, for the color change, format conditional formatting,
gt;gt; gt; formula is =$A$1gt;$B$1, pick the format you want, for the calculation
gt; part
gt;gt; gt; =IF(A1gt;B1,A1-B1,B1-A1)
gt;gt; gt;
gt;gt; gt; --
gt;gt; gt; Paul B
gt;gt; gt; Always backup your data before trying something new
gt;gt; gt; Please post any response to the newsgroups so others can benefit from
gt;gt; gt; it
gt;gt; gt; Feedback on answers is always appreciated!
gt;gt; gt; Using Excel 2002 amp; 2003
gt;gt; gt;
gt;gt; gt; quot;Donquot; gt; wrote in message
gt;gt; gt; ...
gt;gt; gt;gt; In sheet1, A1 value = 10, B1 value = 5 (both vary, sum of numbers on
gt;gt; gt; another
gt;gt; gt;gt; sheet)
gt;gt; gt;gt;
gt;gt; gt;gt; I would like to have another cell (we'll call it Difference) that
gt;gt; gt; determines
gt;gt; gt;gt; which is greater (A1 or B1) and if A1 is greater, then color this
gt; result
gt;gt; gt; in
gt;gt; gt;gt; red and calculate A1-B1. However, if B1 is greater, keep the default
gt;gt; gt;gt; color
gt;gt; gt;gt; and calculate B1-A1.
gt;gt; gt;gt;
gt;gt; gt;gt; Is this possible with function(s)?
gt;gt; gt;gt;
gt;gt; gt;gt; Don
gt;gt; gt;gt;
gt;gt; gt;gt;
gt;gt; gt;
gt;gt; gt;
gt;gt;
gt;gt;
gt;
gt;
Your welcome
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 amp; 2003

quot;Donquot; gt; wrote in message
...
gt; That's what I needed....had forgotten this little feature....thanks so
gt; much Paul.
gt;
gt; Don
gt; quot;Paul Bquot; gt; wrote in message
gt; ...
gt;gt; Don, a function can not change the font color but you can use conditional
gt;gt; formatting to change that cell, select the quot;value cellquot; and click on
gt;gt; format,
gt;gt; conditional formatting, change cell valve is to formula is and put in
gt;gt; =$A$1gt;$B$1, click on format, font, color, pick red, OK, OK now when A1gt;B1
gt;gt; your quot;value cellquot; will change to red font.
gt;gt;
gt;gt; --
gt;gt; Paul B
gt;gt; Always backup your data before trying something new
gt;gt; Please post any response to the newsgroups so others can benefit from it
gt;gt; Feedback on answers is always appreciated!
gt;gt; Using Excel 2002 amp; 2003
gt;gt;
gt;gt; quot;Donquot; gt; wrote in message
gt;gt; ...
gt;gt;gt; Paul,
gt;gt;gt;
gt;gt;gt; Yes, I understand and know about the calculation......but, what I don't
gt;gt; know
gt;gt;gt; is if the A1 gt;B1, how can I tie changing the value color (not the cell
gt;gt;gt; background) to a different color, in this case red, within the SAME cell
gt;gt;gt; function? And, what is that function?
gt;gt;gt;
gt;gt;gt; Thanks,
gt;gt;gt; Don
gt;gt;gt; quot;Paul Bquot; gt; wrote in message
gt;gt;gt; ...
gt;gt;gt; gt; Don, in two steps, for the color change, format conditional
gt;gt;gt; gt; formatting,
gt;gt;gt; gt; formula is =$A$1gt;$B$1, pick the format you want, for the calculation
gt;gt; part
gt;gt;gt; gt; =IF(A1gt;B1,A1-B1,B1-A1)
gt;gt;gt; gt;
gt;gt;gt; gt; --
gt;gt;gt; gt; Paul B
gt;gt;gt; gt; Always backup your data before trying something new
gt;gt;gt; gt; Please post any response to the newsgroups so others can benefit from
gt;gt;gt; gt; it
gt;gt;gt; gt; Feedback on answers is always appreciated!
gt;gt;gt; gt; Using Excel 2002 amp; 2003
gt;gt;gt; gt;
gt;gt;gt; gt; quot;Donquot; gt; wrote in message
gt;gt;gt; gt; ...
gt;gt;gt; gt;gt; In sheet1, A1 value = 10, B1 value = 5 (both vary, sum of numbers on
gt;gt;gt; gt; another
gt;gt;gt; gt;gt; sheet)
gt;gt;gt; gt;gt;
gt;gt;gt; gt;gt; I would like to have another cell (we'll call it Difference) that
gt;gt;gt; gt; determines
gt;gt;gt; gt;gt; which is greater (A1 or B1) and if A1 is greater, then color this
gt;gt; result
gt;gt;gt; gt; in
gt;gt;gt; gt;gt; red and calculate A1-B1. However, if B1 is greater, keep the default
gt;gt;gt; gt;gt; color
gt;gt;gt; gt;gt; and calculate B1-A1.
gt;gt;gt; gt;gt;
gt;gt;gt; gt;gt; Is this possible with function(s)?
gt;gt;gt; gt;gt;
gt;gt;gt; gt;gt; Don
gt;gt;gt; gt;gt;
gt;gt;gt; gt;gt;
gt;gt;gt; gt;
gt;gt;gt; gt;
gt;gt;gt;
gt;gt;gt;
gt;gt;
gt;gt;
gt;
gt;

全站熱搜
創作者介紹
創作者 software 的頭像
software

software

software 發表在 痞客邦 留言(0) 人氣()