+ Reply to Thread
Results 1 to 21 of 21

Colour Cell background based on cell values

  1. #1
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Chennai, India
    MS-Off Ver
    Excel 2003, 2010
    Posts
    212

    Colour Cell background based on cell values

    Hi

    I have a requirement to colour the cell background based on each cell value.

    Attached the sample file with conditions at column (A,B,C).

    Column H in the file to be coloured.

    Note: The number of rows in column H is dynamic.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Colour Cell background based on cell values

    Use a dynamic named range for column H, then use conditional formatting.
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  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: Colour Cell background based on cell values

    Hello

    No need of VBA here. Only Conditional formatting.

    1 rule(for yellow)
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Same way for the others.

    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.

  4. #4
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Chennai, India
    MS-Off Ver
    Excel 2003, 2010
    Posts
    212

    Re: Colour Cell background based on cell values

    Nathansav

    Thanks! the problem is i want this run in 2003, 2007 and 2010.

    Conditional format cannot be provided for 5 in 2003.

  5. #5
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Colour Cell background based on cell values

    non vba solution.

    solution with Vlookup, see the attached file.
    Attached Files Attached Files
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  6. #6
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Colour Cell background based on cell values

    For 5? What do you mean?

  7. #7
    Registered User
    Join Date
    01-04-2013
    Location
    Newcastle, England
    MS-Off Ver
    Excel 2010
    Posts
    66

    Re: Colour Cell background based on cell values

    Hi you just need to highlight the column and select conditional format option in the home tab and select new rule choose format cells that only contain repeat this step for each condition

  8. #8
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Chennai, India
    MS-Off Ver
    Excel 2003, 2010
    Posts
    212

    Re: Colour Cell background based on cell values

    nathan

    If you look in to the number for conditions it is total 5.

    I want to loop thru all the 5 conditions in column H and apply colour index based on the conditional colours.

  9. #9
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Chennai, India
    MS-Off Ver
    Excel 2003, 2010
    Posts
    212

    Re: Colour Cell background based on cell values

    oeldere

    I want to colour the same column H.

  10. #10
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Colour Cell background based on cell values

    Please Login or Register  to view this content.
    Yes i did notice that, but I thought my solution could be useful to you.

    What are you gonna do, with the colors, after they are in your file.

    Just for visual purpose, or you want to analyze data with the colors?

    please reply.

  11. #11
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Chennai, India
    MS-Off Ver
    Excel 2003, 2010
    Posts
    212

    Re: Colour Cell background based on cell values

    Hi Oeldere

    It is basically for analysing data so colour is very important.

  12. #12
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Chennai, India
    MS-Off Ver
    Excel 2003, 2010
    Posts
    212

    Re: Colour Cell background based on cell values

    Oeldere

    Any Luck? I'm not sure how to use between operator to check the conditions

  13. #13
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Colour Cell background based on cell values

    Please Login or Register  to view this content.
    And how you gonna use the color for analyzing in excel 2003 (see you comment #4)?

    So it is NOT just for visual purpose?

  14. #14
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Chennai, India
    MS-Off Ver
    Excel 2003, 2010
    Posts
    212

    Re: Colour Cell background based on cell values

    Oeldere

    The column H values will be used for other sub routines which reads based on the colour thats why im trying to colour column H

  15. #15
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Colour Cell background based on cell values

    Please Login or Register  to view this content.
    It stays misty around this case.

    Please explain better.

    Second question:

    the subroutine is VBA or formula?

  16. #16
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Chennai, India
    MS-Off Ver
    Excel 2003, 2010
    Posts
    212

    Re: Colour Cell background based on cell values

    Oeldere

    Sorry if its not clear.

    What im trying to achieve is to check the column h values by the 5 coditions provided in column ABC.

    If the value in column H satisfies any of the 5 conditions then it should updated with background colour of the specific condition.

    The colours are then read by downstream apps which includes VBA as well as some web application as well.

  17. #17
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Colour Cell background based on cell values

    I am not able to see #16, since the page don't change from page 1 to page 2.

  18. #18
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Chennai, India
    MS-Off Ver
    Excel 2003, 2010
    Posts
    212

    Re: Colour Cell background based on cell values

    i can navigate to page 2

  19. #19
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Chennai, India
    MS-Off Ver
    Excel 2003, 2010
    Posts
    212

    Re: Colour Cell background based on cell values

    Hi

    Can anyone help to resolve this?

    stuck with this part to colour the cells.

  20. #20
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Colour Cell background based on cell values

    If you also want to use it in excel 2003 you have to rely on VBA since CF in excel 2003 only except 3 criteria.

  21. #21
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Chennai, India
    MS-Off Ver
    Excel 2003, 2010
    Posts
    212

    Re: Colour Cell background based on cell values

    yes, thats why i need help from experts to write a loop to check all the 5 conditions.

    Any hint will be really helpful.

  22. #22
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Chennai, India
    MS-Off Ver
    Excel 2003, 2010
    Posts
    212

    Re: Colour Cell background based on cell values

    Hi

    Can any one help to resolve this query?

+ 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. moving cell to top of list based on colour of background
    By kevinless in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 2
    Last Post: 06-18-2014, 08:26 AM
  2. [SOLVED] Show number in cell based on cell background colour
    By philjuk in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 12-11-2013, 02:04 PM
  3. Change background colour of a cell based on value of another cell
    By maryfay in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 09-07-2012, 10:25 AM
  4. IF formula based on background cell colour
    By mr_teacher in forum Excel General
    Replies: 1
    Last Post: 11-28-2007, 10:44 AM
  5. Changing Background Colour Based on Cell Contents
    By Sukh in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-12-2006, 09:00 AM

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