ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   If statement and cell format (https://www.excelbanter.com/excel-discussion-misc-queries/126606-if-statement-cell-format.html)

Sam

If statement and cell format
 
I have a the following formula in A1 cell =if(Logic_test, A2,A3).
In A2 I have "increase" in red font and in A3 I have "Decrease" in blue
font. But when the value printed in A1 it is black no matter what. How can I
make the format (mainly color of the font) of A1 to be same as A2 or A3?

<redincrease</red

Bernard Liengme

If statement and cell format
 
By adding two conditional formats
With A3 selected use: Format | Conditional Format
"Cell value is" - "Equal to " - "Increase" ----- and set the font colour
Now add the second
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Sam" wrote in message
...
I have a the following formula in A1 cell =if(Logic_test, A2,A3).
In A2 I have "increase" in red font and in A3 I have "Decrease" in blue
font. But when the value printed in A1 it is black no matter what. How can
I
make the format (mainly color of the font) of A1 to be same as A2 or A3?

<redincrease</red




JE McGimpsey

If statement and cell format
 
Take a look at XL Help's "Conditional Formatting" topic.

In article ,
Sam wrote:

I have a the following formula in A1 cell =if(Logic_test, A2,A3).
In A2 I have "increase" in red font and in A3 I have "Decrease" in blue
font. But when the value printed in A1 it is black no matter what. How can I
make the format (mainly color of the font) of A1 to be same as A2 or A3?

<redincrease</red


RagDyeR

If statement and cell format
 
You can't control the format with formulas.

However, you can use "Conditional Formatting" on the cells containing such
types of formulas, to change the cells format. depending on the return of
the formula.
--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

"Sam" wrote in message
...
I have a the following formula in A1 cell =if(Logic_test, A2,A3).
In A2 I have "increase" in red font and in A3 I have "Decrease" in blue
font. But when the value printed in A1 it is black no matter what. How can I
make the format (mainly color of the font) of A1 to be same as A2 or A3?

<redincrease</red




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

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