+ Reply to Thread
Results 1 to 9 of 9

Conditional Formatting - Coloring Cells based on Values

  1. #1
    Registered User
    Join Date
    09-27-2012
    Location
    Orange County, CA
    MS-Off Ver
    Excel 2010
    Posts
    85

    Conditional Formatting - Coloring Cells based on Values

    I have a workbook that has numbers in rows and columns but majority of cells are empty. I want to be able to color the cells that are not empty and has a number greater than 5. 5 different But I want to use different colors for different rows, or atleast 5 different colors for 5 different rows and then the colors can repeat themselves. There are about 50 rows and 12 columns that have data.

    I know that I can use conditional formatting to format them in one color when it is more than 5 but I dont know how to do different colors.

    I have attached a sample worksheet with the before and after tab.

    Any help is really appreciated.
    Attached Files Attached Files

  2. #2
    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: Conditional Formatting - Coloring Cells based on Values

    Hi

    We can use many conditions according the number of the month in column A.

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



    How can you use Conditional Formating.

    --In Excel 2007 and 2010, Conditional Formatting is in the Styles group on the Home tab. In Excel 2003, Conditional Formatting is on the Format menu. See here how you can work using CF.
    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.

  3. #3
    Registered User
    Join Date
    09-27-2012
    Location
    Orange County, CA
    MS-Off Ver
    Excel 2010
    Posts
    85

    Re: Conditional Formatting - Coloring Cells based on Values

    Hi Fotis, Thanks a lot for such a quick reply !

    In the file that you have attached, the conditional formatting is not working properly, see eg F3 and K3 should not be highlighted, similarly J3 J4 and L4 should be highlighted ! Do I need to change the formula?

    BTW. Thanks for the link, I am still reading it, it has lots of information !!

  4. #4
    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: Conditional Formatting - Coloring Cells based on Values

    Just a small modification!

    Take a look now!
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    09-27-2012
    Location
    Orange County, CA
    MS-Off Ver
    Excel 2010
    Posts
    85

    Re: Conditional Formatting - Coloring Cells based on Values

    This is awesome. I looked at the formula and was wondering how will the formula need to be changed if the data in column A does not repeat itself. ie It goes from One to Twelve or are random words or numbers?

  6. #6
    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: Conditional Formatting - Coloring Cells based on Values

    For eatch value in column A-in your case you name the months as one, two, three .....twelve, we create a different first condition in our formula leaving the second condition the same for all months..

    =AND($A2="one",B2>5.5)

    =AND($A2="two",B2>5.5)
    ...
    ...

    =AND($A2="twelve",B2>5.5)

    For eatch condition we use a different color.

  7. #7
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Conditional Formatting - Coloring Cells based on Values

    If you use different terms in column A and you want conditional formatting for those terms, new rules will have to be written that uses those terms.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  8. #8
    Registered User
    Join Date
    09-27-2012
    Location
    Orange County, CA
    MS-Off Ver
    Excel 2010
    Posts
    85

    Re: Conditional Formatting - Coloring Cells based on Values

    so essentially it cannot be "generalized" for a big spreadsheet with potentially hundreds of rows and random column A. How will we do that without creating a rule for each line? Will it be macro?
    Can the rule be generalized, say, for first line use this rule, for every second line use this and for every third line use this rule? so the colors repeat themselves, without looking for a unique value?

  9. #9
    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: Conditional Formatting - Coloring Cells based on Values

    Quote Originally Posted by desibabuji View Post
    so essentially it cannot be "generalized" for a big spreadsheet with potentially hundreds of rows and random column A. How will we do that without creating a rule for each line?
    We don't create a rule for eatch line. We create a rule for eatch unique value in column A. So in you example increasing the range you'll get for month "one" for example the same color in all rows that in column A exist the word one.

    See a small video that i made for you. Apologize for my poor English!

    http://screencast.com/t/GO45za3YT7

+ 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. [SOLVED] Conditional formatting - coloring cells across array if value exists in a list
    By mudder12 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 12-05-2012, 12:38 PM
  2. Conditional Formatting - Coloring Cells in Rows according Text in it
    By Novice_To_Excel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-11-2012, 01:28 AM
  3. Replies: 7
    Last Post: 02-06-2012, 01:13 PM
  4. Replies: 5
    Last Post: 11-17-2010, 04:23 AM
  5. Conditional coloring of Excel cells, based on adjacent cell values?
    By Greg Stuart in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-10-2006, 06:20 PM

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