+ Reply to Thread
Results 1 to 6 of 6

Format change

  1. #1
    Forum Contributor
    Join Date
    05-05-2004
    MS-Off Ver
    Office 365
    Posts
    643

    Format change

    How would I change the background color to green from red if the value of a1 is greater and the value of b1?

    Thanks for your help,
    Ken

  2. #2
    Forum Expert swatsp0p's Avatar
    Join Date
    10-07-2004
    Location
    Kentucky, USA
    MS-Off Ver
    Excel 2010
    Posts
    1,545
    With A1 the active cell (and red fill color), select Format>Conditional Formatting...

    Set Condition 1 to 'Cell Value Is' Greater Than B1 click the Pattern tab and choose your fill color (green?) and click OK

    Does this work for you?
    Bruce
    The older I get, the better I used to be.
    USA

  3. #3
    Forum Contributor
    Join Date
    05-05-2004
    MS-Off Ver
    Office 365
    Posts
    643
    thanks very much that works just fine.

  4. #4
    Forum Contributor
    Join Date
    05-05-2004
    MS-Off Ver
    Office 365
    Posts
    643
    how about if i want to make the background blue if its 1/4 of a1 or red if its 1/2 of a1 or green if its 3/4 of a1? can u do this??

  5. #5
    Forum Contributor
    Join Date
    05-05-2004
    MS-Off Ver
    Office 365
    Posts
    643
    sad bump please..... anyone ?

  6. #6
    David McRitchie
    Guest

    Re: Format change

    Use the Formula instead for your Conditional Formatting, see
    http://www.mvps.org/dmcritchie/excel/condfmt.htm

    You will need to set up 3 formula for each of the three colors
    Depending on whether you only want B1 to change color,
    or the entire column to be checked or the entire row to be
    colored you will have to modify relative and absolute address.
    If you mean specifically A1 then use $A$1 otherwise you
    could use the following just to color cell B1, and thing in the
    B column or any row based on the value in the B cell of that row.
    The cell B1 must be the active cell when creating the C.F
    (actually with $Bn any cell on row 1 could be the active cell).

    Formula 1: =AND($B1*4=$A1, ISNUMBER($B1)) format as blue (pattern color)
    Formula 2: =AND($B1*2=$A1,ISNUMBER($B1)) format as red
    Formula 3: =AND($B1=(3/4*$A1),ISNUMBER($B1)) format as green

    If you want more than 3 colors (+ default) you will have to use an Event macro
    or use the Extended Conditional formatting addin see the reference above.

    FWIW, use of ExcelForum makes searching of websites very difficult
    for everyone because ExcelForum dumps newsgroup postings into webpages.

    ---
    HTH,
    David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
    My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
    Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

    "sungen99" <sungen99.1yc8za_1131722400.9857@excelforum-nospam.com> wrote in message
    news:sungen99.1yc8za_1131722400.9857@excelforum-nospam.com...
    >
    > how about if i want to make the background blue if its 1/4 of a1 or red
    > if its 1/2 of a1 or green if its 3/4 of a1? can u do this??
    >
    >
    > --
    > sungen99
    > ------------------------------------------------------------------------
    > sungen99's Profile: http://www.excelforum.com/member.php...fo&userid=9144
    > View this thread: http://www.excelforum.com/showthread...hreadid=482875
    >




+ 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