+ Reply to Thread
Results 1 to 8 of 8

Coloring changing same values with conditional formatting !!

  1. #1
    Registered User
    Join Date
    02-06-2012
    Location
    NY
    MS-Off Ver
    Excel 2007
    Posts
    25

    Coloring changing same values with conditional formatting !!

    Hi, I want to color same values in a 20000 rows of changing values red and blue alternatively.
    I 've attached the file and the the result I 'm trying to achieve. Finding the solution for this is driving me crazy.

    Big thanks in advance.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by Hajik; 02-06-2012 at 01:24 PM. Reason: NBVC solved the case. Case Closed. :)

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

    Re: Coloring changing same values with conditional formatting !!

    In a helper column, try:

    =MOD(B1+(A1<>A2),2)

    copied down

    Then select the range to colour and invoke conditional formatting>> use a formula to determine which cells to format:

    =B2=1 formatted with pink

    then add another condition

    =B2=0 formatted with blue.
    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
    02-06-2012
    Location
    NY
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Coloring changing same values with conditional formatting !!

    Quote Originally Posted by NBVC View Post
    In a helper column, try:

    =MOD(B1+(A1<>A2),2)

    copied down

    Then select the range to colour and invoke conditional formatting>> use a formula to determine which cells to format:

    =B2=1 formatted with pink

    then add another condition

    =B2=0 formatted with blue.
    Tnx but there is a problem in your zero and one formula.Look in the pic.I've also attached my excel file.
    Attached Images Attached Images
    Attached Files Attached Files

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

    Re: Coloring changing same values with conditional formatting !!

    Hmmm....

    Try this one in B2:

    =MOD(OFFSET($B2,-1,0) --(A2<>OFFSET(A2,-1,0)),2)

    copied down

  5. #5
    Registered User
    Join Date
    02-06-2012
    Location
    NY
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Coloring changing same values with conditional formatting !!

    Quote Originally Posted by NBVC View Post
    Hmmm....

    Try this one in B2:

    =MOD(OFFSET($B2,-1,0) --(A2<>OFFSET(A2,-1,0)),2)

    copied down
    nope it didn't work.
    Look the problem occurs when there is a jump in date, for example from 5 jan to 7 jan or for another example from 12 jan to 14 jan.
    I've attached the pix.
    Attached Images Attached Images

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

    Re: Coloring changing same values with conditional formatting !!

    In your file, I put the formula in B1 and copied down. I don't see what you are seeing....

    Note: I placed a 2 in B1 so that I conditionally format whole column A without highlighting the column header.... that doesn't effect the formula outcome though...
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    02-06-2012
    Location
    NY
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Coloring changing same values with conditional formatting !!

    Quote Originally Posted by NBVC View Post
    In your file, I put the formula in B1 and copied down. I don't see what you are seeing....

    Note: I placed a 2 in B1 so that I conditionally format whole column A without highlighting the column header.... that doesn't effect the formula outcome though...
    It worked!! It seems I was entering your formula in the wrong cell!! Oh God MY MISTAKE!!!
    I've been struggling to find the answer for more than 12 hours.You did me a big favor. I really don't know how to thank u.
    :X

    BTW How can I put a [SOLVED] next to the title of the topic.
    Last edited by Hajik; 02-06-2012 at 01:11 PM. Reason: adding BTW

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

    Re: Coloring changing same values with conditional formatting !!

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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