+ Reply to Thread
Results 1 to 2 of 2

Conditional Formatting Cells

  1. #1
    Registered User
    Join Date
    02-28-2006
    Posts
    1

    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 format 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.
    Last edited by tgorrie; 02-28-2006 at 02:15 PM.

  2. #2
    Tim Barlow
    Guest

    Re: 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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1