ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Conditional Formatting Cells (https://www.excelbanter.com/excel-programming/354601-conditional-formatting-cells.html)

tgorrie[_2_]

Conditional Formatting Cells
 

I need help with conditional formatting.

A B
40 QTD Actual $3,654,317
41 Qtr. Objective $6,332,604
42 % Attainment QTD 57.7%
43 QTD Par % 53.8%


I'm not sure how to code this.

Cell be B43 varies as the monthly sales increase, Cell A40

Condition 1: Formula Is: If cell B42 is greater then B43 change B42 to
green. I understand how to fromat the color.

Condition 2: Formula Is: If cell B42 is between .01% and 5% of B43.
Change B42 to yellow.

Condition 3: Formula Is: If cell B42 is less then 5% of B43. Change B42
to Red.

Thanks for your help and input.


--
tgorrie
------------------------------------------------------------------------
tgorrie's Profile: http://www.excelforum.com/member.php...o&userid=32005
View this thread: http://www.excelforum.com/showthread...hreadid=517359


Tim Barlow

Conditional Formatting Cells
 

Try something like:

If Range("B42") = Range("B43") Then
Range("B42").Font.Color = vbGreen
ElseIf Range("B42") = Range("B43") - 0.05 Then
Range("B42").Font.Color = vbYellow
Else
Range("B42").Font.Color = vbRed
End If

HTH

Tim


"tgorrie" wrote in
message ...

I need help with conditional formatting.

A B
40 QTD Actual $3,654,317
41 Qtr. Objective $6,332,604
42 % Attainment QTD 57.7%
43 QTD Par % 53.8%


I'm not sure how to code this.

Cell be B43 varies as the monthly sales increase, Cell A40

Condition 1: Formula Is: If cell B42 is greater then B43 change B42 to
green. I understand how to fromat the color.

Condition 2: Formula Is: If cell B42 is between .01% and 5% of B43.
Change B42 to yellow.

Condition 3: Formula Is: If cell B42 is less then 5% of B43. Change B42
to Red.

Thanks for your help and input.


--
tgorrie
------------------------------------------------------------------------
tgorrie's Profile:

http://www.excelforum.com/member.php...o&userid=32005
View this thread: http://www.excelforum.com/showthread...hreadid=517359





All times are GMT +1. The time now is 12:25 AM.

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