ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   colors (https://www.excelbanter.com/excel-worksheet-functions/40475-colors.html)

Mir Khan

colors
 
Can anyone help me with colors using IF statement.
Column A and Column B has numbers and Column C is a logical field to display
thumps up or thumps down with colr green or red.
I have Thumps Up symbol and Thumps Down Symbol from wingdings font. If
number in Column A is greater it should turn the thumps up sign green in color
and if number in Column A is smaller the color of ThumpsDown symbol should
change to red (defualt color is black and default thumps direction is up)

David Billigmeier

Use conditional formatting: Format-Conditional Formatting.

Choose "formula is" and enter this formula for condition 1:

=if(A1B1,TRUE,FALSE)

Then, for the formatting make the font green and do whatever else you wish
to occur if column A is greater than B.

Likewise make this formula for condition 2:

=if(B1A1,TRUE,FALSE)

and make this formatting Red color.

--
Regards,

David Billigmeier



"Mir Khan" wrote:

Can anyone help me with colors using IF statement.
Column A and Column B has numbers and Column C is a logical field to display
thumps up or thumps down with colr green or red.
I have Thumps Up symbol and Thumps Down Symbol from wingdings font. If
number in Column A is greater it should turn the thumps up sign green in color
and if number in Column A is smaller the color of ThumpsDown symbol should
change to red (defualt color is black and default thumps direction is up)


swatsp0p


Dave's response is just what you need. I would like to ask what you
intend to do if A1=B1?

You may want to address this as such:

=IF(A1B1,"C",IF(B1A1,"D","K")) formatted as WingDings (the "K"
returns the smilely face with no expression). Following Dave's Cond.
Formatting, this would be returned in the Automatic font/fill color.

HTH

Bruce


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=395839


David McRitchie

Hi Mir Khan,

If it is the font color you want to change
formula in cell C1:
=IF(A1B1,1,IF(A1<B1,-1,""))

format in cell C1:
[Green]"C";[Red]"D";"";

Fonts
http://www.mvps.org/dmcritchie/rexx/htm/fonts.htm

Examples for normal cell formatting in
http://www.mvps.org/dmcritchie/excel/formula.htm

Examples for Conditional Formatting in
http://www.mvps.org/dmcritchie/excel/condfmt.htm

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Mir Khan" <Mir wrote in message ...
Can anyone help me with colors using IF statement.
Column A and Column B has numbers and Column C is a logical field to display
thumps up or thumps down with colr green or red.
I have Thumps Up symbol and Thumps Down Symbol from wingdings font. If
number in Column A is greater it should turn the thumps up sign green in color
and if number in Column A is smaller the color of ThumpsDown symbol should
change to red (defualt color is black and default thumps direction is up)





All times are GMT +1. The time now is 01:39 PM.

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