View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tim Barlow Tim Barlow is offline
external usenet poster
 
Posts: 34
Default 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