+ Reply to Thread
Results 1 to 5 of 5

IF value in cell greater than x then colour it red

  1. #1
    Registered User
    Join Date
    06-26-2013
    Location
    Northern Ireland
    MS-Off Ver
    Excel 2003, 07, 10
    Posts
    92

    IF value in cell greater than x then colour it red

    Hi I want to insert conditional formatting to a range of cells so that if the number in the cell is greater than 30 it is coloured red. If it is lower than 3 then it is green. If it is between the range of 3 and 30 then it is amber. Has anyone any idea how this is done? I also want this to run a macro after I fully understand how to do it (I know this isnt the macro part but I just wanted to out it out there)

    the ranges are ("H5:H19, H21:H24, H26:H29, H26:H29, H31:H36, H38:H44")

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,743

    Re: IF value in cell greater than x then colour it red

    for 2007 or 2010 excel version

    Conditional Formatting

    Highlight applicable range >>

    "H5:H19, H21:H24, H26:H29, H26:H29, H31:H36, H38:H44"

    Home Tab >> Styles >> Conditional Formatting

    you would need to add three rules

    New Rule >> Use a formula to determine which cells to format
    Edit the Rule Description: Format values where this formula is true:

    = H5 > 30

    Format… [Number, Font, Border, Fill] - RED
    OK >> OK

    New Rule

    = H5 < 3

    Format… [Number, Font, Border, Fill] - GREEN
    OK >> OK

    new rule

    = AND( H5 >= 3, H5 <=30 )

    Format… [Number, Font, Border, Fill] - AMBER
    OK >> OK

    and then the applies to should be
    ("H5:H19, H21:H24, H26:H29, H26:H29, H31:H36, H38:H44")
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    Re: IF value in cell greater than x then colour it red

    Why a macro? It's embedded in XL's CF ?

  4. #4
    Registered User
    Join Date
    06-26-2013
    Location
    Northern Ireland
    MS-Off Ver
    Excel 2003, 07, 10
    Posts
    92

    Re: IF value in cell greater than x then colour it red

    Quote Originally Posted by Pepe Le Mokko View Post
    Why a macro? It's embedded in XL's CF ?

    It won't be consistent numbers in the cells do I'm trying to give myself a better understanding of the Conditional Formatting beforehand. I have been working with my macro code for hours but just cannot seem to get it to work.

  5. #5
    Registered User
    Join Date
    06-26-2013
    Location
    Northern Ireland
    MS-Off Ver
    Excel 2003, 07, 10
    Posts
    92

    Re: IF value in cell greater than x then colour it red

    I know this isn't the macro section but I have solved my problem with a macro anyway, here it is

    Formula: copy to clipboard
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 10-08-2012, 08:10 AM
  2. [SOLVED] VBA. Change cell interior colour for greater visibility
    By rain4u in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-17-2012, 03:36 AM
  3. Replies: 4
    Last Post: 08-25-2009, 06:39 AM
  4. Replies: 3
    Last Post: 07-15-2009, 06:13 AM
  5. If greater than or less than - change colour
    By Dan Mackman in forum Excel General
    Replies: 2
    Last Post: 04-24-2009, 11:39 AM

Tags for this Thread

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