+ Reply to Thread
Results 1 to 7 of 7

Colouring cells based on equal to or greater than value in another cell

  1. #1
    Registered User
    Join Date
    12-14-2011
    Location
    Lincolnshire
    MS-Off Ver
    Excel 2003
    Posts
    4

    Colouring cells based on equal to or greater than value in another cell

    Hi,
    I am working on colouring cells if the student has met or is above their target. Im having problems with comparing cells that contain 4c, 4b, 4a etc so i am using a vlookup table and changed the target values to numbers. I would now like to colour the cells in their current result column if they are on target or above to green and not colour it if they are below. I have included a worksheet example of what i have done, i would just like someone to point me in the right direction as to how to get it to colour the cell using VBA/Macros...I'm only a beginner in using macros and vba.

    Thank you for your time!

    Bex
    Attached Files Attached Files

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Colouring cells based on equal to or greater than value in another cell

    You can use conditional formatting for this. Select Column D, Click on Format -> Conditional Formatting. Under condition 1, choose formula is and type =F2>=G2 in the box provided. Choose the green color below and click ok. Thats it.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Colouring cells based on equal to or greater than value in another cell

    Hi bexybeeuk and welcome to the forum.

    You do not need VBA, for doing this. Just a Conditional Formating, is enough.

    Take a look to the attachement(See Column D)

    Hope to helps you.
    Attached Files Attached Files
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Registered User
    Join Date
    12-14-2011
    Location
    Lincolnshire
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Colouring cells based on equal to or greater than value in another cell

    hi thank you both for your help,

    I was just hoping there was an easier way as i have to do this for every year, could i use the statement in a macro so it automatically does it for spreadsheets i have to create?

    Thanks again,
    Bex

  5. #5
    Registered User
    Join Date
    12-14-2011
    Location
    Lincolnshire
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Colouring cells based on equal to or greater than value in another cell

    this is how many columns i have to do it for (attached)
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    12-14-2011
    Location
    Lincolnshire
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Colouring cells based on equal to or greater than value in another cell

    Bump!......

  7. #7
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Colouring cells based on equal to or greater than value in another cell

    hi bexybeeuk, please check attachment, run code "Progress_Validation"
    Attached Files Attached Files

+ 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