+ Reply to Thread
Results 1 to 5 of 5

Change background color of cell if previous column cell value is different.

  1. #1
    Forum Contributor
    Join Date
    07-09-2013
    Location
    Nagpur, India
    MS-Off Ver
    Excel 2010 / 2013
    Posts
    293

    Change background color of cell if previous column cell value is different.

    Hi, I wants to change the background colour of cell if there is a change in value in previous column cell.
    I wants to apply this settings as horizontally in every row. Please Help !!!
    PS: Please refer the attached file.
    Attached Files Attached Files

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Change background color of cell if previous column cell value is different.

    Not clear what you're asking.

    For a specific row: do you want columns C:N to change colour (to match row 4), if the data in column B changes?

    Or do you want Column C to change colour if column B changes, column D to change colour if column C changes, etc...?

    What about if the values changes a second time? Should the colours change again, or only on first change?
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Contributor
    Join Date
    07-09-2013
    Location
    Nagpur, India
    MS-Off Ver
    Excel 2010 / 2013
    Posts
    293

    Re: Change background color of cell if previous column cell value is different.

    I wants to apply colour in column C to column N..... i.e if column D value is not equal to column C than apply different colour on column D. If column E is same as column D than apply the same colour of column D on column E and so on....!!

    : Column B will be always different from column C.

  4. #4
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Change background color of cell if previous column cell value is different.

    Use something like:
    Please Login or Register  to view this content.
    Not clear how you want to call this - on worksheet change, perhaps, or as a one off loop through all rows?

    To run once on existing data, use:
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    07-09-2013
    Location
    Nagpur, India
    MS-Off Ver
    Excel 2010 / 2013
    Posts
    293

    Re: Change background color of cell if previous column cell value is different.

    Wowwww... !!! Your second code worked for me... thanks u so much OLLY...

+ 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. Replies: 1
    Last Post: 10-23-2012, 03:58 PM
  2. Change background color on value of 1 cell in a row
    By Roel1990 in forum Excel General
    Replies: 9
    Last Post: 08-20-2010, 10:36 AM
  3. Cell Background color change
    By ondra in forum Excel General
    Replies: 3
    Last Post: 06-20-2008, 04:22 AM
  4. background color of my cell does not change
    By Colorblinded in forum Excel General
    Replies: 2
    Last Post: 03-27-2005, 12:06 PM
  5. Change cell background color depending on cell value
    By fredrock80 in forum Excel General
    Replies: 1
    Last Post: 03-14-2005, 03:22 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