+ Reply to Thread
Results 1 to 8 of 8

Color coding cells which meet the criteria

  1. #1
    Registered User
    Join Date
    06-18-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    47

    Color coding cells which meet the criteria

    I have a huge set of data. In a macro i want all cells which meet a value in an adjacent cell to be automatically colored grey at the click of a macro.

    The reason why I am doing it through a macro is because if i use conditional formatting it greys out even the cells which dont contain a value, and there are many of these.

    Any ideas on any syntax for doing something like this?

    Cheers

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Color coding cells which meet the criteria

    What Condition have you set for the Formatting?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Contributor pierre08's Avatar
    Join Date
    02-16-2010
    Location
    Paris
    MS-Off Ver
    Excel 2003
    Posts
    166

    Re: Color coding cells which meet the criteria

    Hi,
    Try this:

    Please Login or Register  to view this content.
    You'll just have to select your set of data or you can just do a loop for that

    Hope it help

  4. #4
    Registered User
    Join Date
    06-18-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    47

    Re: Color coding cells which meet the criteria

    Will this work even though i have 500 rows of data and each row needs has its own seperate value to be compared against.

    Im not sure i understand the macro as im quite new to excel could you please break it down a little more with explanations?

    Your help is much appreciated

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Color coding cells which meet the criteria

    You have 500 different variations?

  6. #6
    Forum Contributor pierre08's Avatar
    Join Date
    02-16-2010
    Location
    Paris
    MS-Off Ver
    Excel 2003
    Posts
    166

    Re: Color coding cells which meet the criteria

    Please Login or Register  to view this content.
    If you want join your workbook it'll be much easier to understand what you need

  7. #7
    Registered User
    Join Date
    06-18-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    47

    Re: Color coding cells which meet the criteria

    What i have is rows of data indicating a a number (for example 5). In a total cell just for this particular row i may for example have the number 10. Because 5 is less than 10 i want it to turn that cell grey, but because i have cells not containing values i do not want it to highlight the cell grey due to it being less than 10?

    Therefore i may have lots of values so i cant just add 1 value and ask the macro to only lookup the one?

  8. #8
    Forum Contributor pierre08's Avatar
    Join Date
    02-16-2010
    Location
    Paris
    MS-Off Ver
    Excel 2003
    Posts
    166

    Re: Color coding cells which meet the criteria

    You'll just have to enter your value, and then all the cells that contains a value smaller than the one entered it'll turn grey and it'll not highlight the empty cell grey

    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)

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