+ Reply to Thread
Results 1 to 5 of 5

Change Cell color based on other cell content

  1. #1
    Registered User
    Join Date
    07-05-2012
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Change Cell color based on other cell content

    Is there a way to change a cell color based on wether or not other cells have content?
    Something like
    (if any cell in cell range A1-X200 is not empty, then cell X201 is green fill)
    (else X201 is no fill)
    Thanks!

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Change Cell color based on other cell content

    Select cell X201 and go to Home|Conditional Formatting|New Rule

    Select "Use a formula to determine which cells to format"

    enter formula:

    =COUNTIF($A$1:$X$200,"<>")

    click format and choose from Fill tab.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    07-05-2012
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Change Cell color based on other cell content

    Thanks, that worked.
    Now.. how do I drag that down so each cell under that changes format fill according to the cells in row to immediate left? (Like you can do with a sum formula, it will automatically increment range row numbers as you drag it down to cells below) - unfortunately this does not seem to work with conditional formatting, or is there a secret key to hold down to drag conditional formatting?
    Thanks

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Change Cell color based on other cell content

    I am not sure exactly what you mean.

    You want to use the same format in X202 and highlight it if A2:X201 are all blank? doesn't seem to make sense..

  5. #5
    Registered User
    Join Date
    07-05-2012
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Change Cell color based on other cell content

    Found answer - difference between absolute and relative references
    Put the $ sign on each part of the cell that you don't want to move, i.e. $A$39 - cell A39 will not be copied relatively, it will always be A39 as you copy the formula down. Remove the $ signs and it will be copied relatively (references increment.)
    So:
    =COUNTIF($A$1:$X$200,"<>") (absolute, not incrementally dragable)
    or
    =COUNTIF(A1:X200,"<>") (relative, incrementally dragable)

+ 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