+ Reply to Thread
Results 1 to 9 of 9

Conditional formatting of one row incorrectly applying to all rows

  1. #1
    Registered User
    Join Date
    04-24-2011
    Location
    NY/NY
    MS-Off Ver
    Excel 2007
    Posts
    3

    Conditional formatting of one row incorrectly applying to all rows

    Hello,

    I am creating a band song list spreadsheet in Excel 2007. The sheet contains one song per row with a status column per song that has a pull-down menu via validated data list of "Ready for Show", "Practicing", "Sidelined". I am using conditional formatting to fill the cell with colors of green (ready), yellow (practicing), red (sidelined). I defined that conditional formatting on one cell in row 5 (which works fine), and then copied the conditional formatting to the other rows. The problem is, when I change the status of the original cell/row where the conditional formatting was defined to "Ready for Show", it changes to green (correctly), but it also changes the colors of all other rows to green (incorrectly, since I only intend it to turn green when each row's status is set to "Ready for Show").

    The formula in the conditional formatting where I created it on Row 5 is: =COUNTIF($D$5, "*Ready*")
    When I look at the conditional formatting copied to row 10, it is: =COUNTIF($D$10, "*Ready*")

    So it looks like Row 10 should operate independently as I intend, but the color for row 10 still changes color incorrectly according to the contents of Row 5 rather than Row 10.

    I'm sure there's something I'm missing, but I've been struggling with this for a while so I'm hoping someone can help.

    Thanks,
    Peter

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Conditional formatting of one row incorrectly applying to all rows

    kind of hard to guess ,post an example showing where this is happening
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    04-24-2011
    Location
    NY/NY
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Conditional formatting of one row incorrectly applying to all rows

    Quote Originally Posted by martindwilson View Post
    kind of hard to guess ,post an example showing where this is happening
    Sorry -- it didn't occur to me that I could upload the excel file. I have attached it. The cell where I created the conditional formatting is D5, I copied it to a few other cells (D2-3, D10, D27). All of those that were copied to take on the color of D5, where I intended to have them key off the contents of their own cell.
    Attached Files Attached Files

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Conditional formatting of one row incorrectly applying to all rows

    you have more cfs than you need some referring to the wrong cells take d4 for example it has 20 conditions the fifth one for example refers to d5 not d4
    i suggest you clean out the cf and start again

  5. #5
    Registered User
    Join Date
    04-20-2011
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2013
    Posts
    54

    Re: Conditional formatting of one row incorrectly applying to all rows

    Hi mate,

    I might have the solution for you here in the excel sheet I have attached.

    I have deleted all your Conditional Formatting rules. Then I marked column D and set in the following 3 rules (you can always add more yourself based on the ones I made - otherwise contact me).

    I used the following rule:

    Please Login or Register  to view this content.
    These rules will apply to the entire column D. If you need more help let me know.
    Attached Files Attached Files

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Conditional formatting of one row incorrectly applying to all rows

    =AND(COUNTIF(D1, "Ready to Perform") why the and? its not needed =COUNTIF(D1, "Ready to Perform") will do
    if you are going to put the whole phrase in there you might as well use cell value is equal to = "ready to perform"

  7. #7
    Registered User
    Join Date
    04-20-2011
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2013
    Posts
    54

    Re: Conditional formatting of one row incorrectly applying to all rows

    True the =AND is not needed in the formula - but can we agree the solution I gave works?

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Conditional formatting of one row incorrectly applying to all rows

    i dont disagree just pointing it out, also the op wanted to know what was wrong not just a fix, the problem is if you have say 3 rules in a cell say a1
    a1="x" red
    a1= "y" blue
    a1="z" yellow
    now you format c1 as c1="x" green
    copy paste format to a1
    it doesnt over write a1 it adds it to the top
    so now you get
    a1="x" green
    a1="x" red
    a1= "y" blue
    a1="z" yellow
    so make sure you clear any old formats out first

  9. #9
    Registered User
    Join Date
    04-24-2011
    Location
    NY/NY
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Conditional formatting of one row incorrectly applying to all rows

    Kagesen and Martin,

    Thanks so much for your help. The modified solution does indeed work perfectly and learning that the copy of conditional formatting is cumulative (which is not intuitive, at least to me) helps me understand how to avoid this issue in the future. This is one of those things that I wouldn't have figured out in a long time without your help, so I really appreciate it!

    Regards,
    Peter

+ 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