+ Reply to Thread
Results 1 to 12 of 12

Cell color will be changed based on its value compare with previous cell value

  1. #1
    Forum Contributor
    Join Date
    06-08-2012
    Location
    BD
    MS-Off Ver
    Microsoft Office 2016
    Posts
    633

    Cell color will be changed based on its value compare with previous cell value

    Dear all,
    This is Nur once again, Cell color will be changed based on its value compare with previous cell value . if compare results value is greater than previous cell then its cell color will be GREEN , if less than then its cell color will be RED. But if previous cell value is equal to next cell value then next cell will be YELLOW. And this process will be continue till last non-blank ROW as well as till last non-bank Column. I have explained my requirement with the arrow sign in the attachment for more clarification..take care..
    Attached Files Attached Files

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Cell color will be changed based on its value compare with previous cell value

    Hui Nur. Try:
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    06-08-2012
    Location
    BD
    MS-Off Ver
    Microsoft Office 2016
    Posts
    633

    Re: Cell color will be changed based on its value compare with previous cell value

    Hi Mumps1,
    It works perfectly & speed is extremely fast which is very much appreciated, thanks for Your valuable time ..take care.. nur

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Cell color will be changed based on its value compare with previous cell value

    My pleasure.

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Cell color will be changed based on its value compare with previous cell value

    Hi, nur2544,

    as opposed to your request in the workbook in this code there is no comparision for Column B being compared to Column C as both counters start on 3 and feature an Offset of -1 respectively.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  6. #6
    Forum Contributor
    Join Date
    06-08-2012
    Location
    BD
    MS-Off Ver
    Microsoft Office 2016
    Posts
    633

    Re: Cell color will be changed based on its value compare with previous cell value

    Hi Holger ,
    Thanks for replay, I might not express my requirement correctly in the post , but here in practically I am getting my desires output results except column B as it is not being color, it would be better if this column also like other column . apart from this column still I am checking in various way to find out whether any discrimination or not in the other column , I will let you know if i get any issue . take care..
    Last edited by nur2544; 07-02-2013 at 12:32 PM.

  7. #7
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Cell color will be changed based on its value compare with previous cell value

    Hi Holger. I noticed that as well and had come up with an addition of another loop in the code to deal with it.
    Please Login or Register  to view this content.
    This could be added at the bottom of the previous code. I didn't include it because I thought that it might be acceptable without it.

  8. #8
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Cell color will be changed based on its value compare with previous cell value

    Hi, Mumps1,

    thanks for updating with this sniplet. Now itīs up to nur2544 to decode whether to add this to the existing code or not.

    Ciao,
    Holger

  9. #9
    Forum Contributor
    Join Date
    06-08-2012
    Location
    BD
    MS-Off Ver
    Microsoft Office 2016
    Posts
    633

    Re: Cell color will be changed based on its value compare with previous cell value

    Hi Holger , now i got your point , thank for find out the issue what i was not noticed before..

    Hi Mumps1, thanks for fulfillment my requirement & now it is 100% correct...

  10. #10
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Cell color will be changed based on its value compare with previous cell value

    Hi Nur. Unfortunately, I noticed another possible problem. If you change cell E5 so that it is less than F5, it still remains green. Is this OK or is it a problem?

  11. #11
    Forum Contributor
    Join Date
    06-08-2012
    Location
    BD
    MS-Off Ver
    Microsoft Office 2016
    Posts
    633

    Re: Cell color will be changed based on its value compare with previous cell value

    Hi Mumps1, yes that is not major issue , no need to work more , as i can move apart form this very well , thanks for concern ...Nur

  12. #12
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Cell color will be changed based on its value compare with previous cell value

    Sounds good.

+ 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