You can use conditional formatting to change the color of text based on some condition:
1. Open a new Excel file.
2. Type in some sample numbers in a column B like 0, -1, and 1. In column C, We will mention on which color the cells should be.
It looks like:
Column B Column C
0
-1
1
3. Select the cells you want to be affected by the conditional formatting. In this example, I have selected B2, B3, B4, C2, C3, and C4.
4. Select the cells you want to be affected by the conditional formatting. In this example, I have selected B2, B3, B4, C2, C3, and C4.
The
Conditional Formatting box will appear.
5. In this box, change Condition 1 to "Formula Is".
6. Then type "=$B2=0" without the quotation marks. This is saying that if the cell in this row that resides on the B column is equal to zero, then the conditional formatting will be applied.
7. Click
Format... to specify the format applied when the condition is true. The format can include font, cell color, borders, and more.
In this example, I set the formatting to color the cell blue.
8. Click
Add >> to add another row in the
Conditional Formatting box.
9. Repeat steps 5 through 7 twice. Specify different formatting options and use the following formulas: "=$B2<0" and "=$B2>0". When you're done, your
Conditional Formatting box should look like the sample below.
Thanks,
Venkat..