Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / February 2006

Tip: Looking for answers? Try searching our database.

Conditional Formatting Cells

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tgorrie - 28 Feb 2006 16:07 GMT
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.

Signature

tgorrie

Tim Barlow - 28 Feb 2006 22:14 GMT
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

> I need help with conditional formatting.
>
[quoted text clipped - 18 lines]
>
> Thanks for your help and input.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.