+ Reply to Thread
Results 1 to 7 of 7

Change Excel (2010) Row color per the value in the row-cell using VBA code

  1. #1
    Registered User
    Join Date
    11-18-2012
    Location
    usa
    MS-Off Ver
    Excel 2010
    Posts
    3

    Lightbulb Change Excel (2010) Row color per the value in the row-cell using VBA code

    Hello everyone,

    I have around 300 rows full of information.
    I would like to change row color per the value in column 'z' cell of that row.
    for example:
    - change the row-1 color to 'Green' if Z1 = DONE
    - change the row-2 color to 'Red' if Z2 = NOTDONE
    - change the row-3 color to 'Yellow' if Z3 = PROGRESS

    I am looking for a VBA code to run automatically ac soon as the value is entered in cells.
    Can someone please help me..!

    Thank you,
    Sandy

  2. #2
    Forum Contributor
    Join Date
    10-31-2012
    Location
    Maryland, USA
    MS-Off Ver
    Excel 2003/2007
    Posts
    145

    Re: Change Excel (2010) Row color per the value in the row-cell using VBA code

    Sandyusa,

    I have attached a workbook that will run the Color_Rows macro evertime you open the workbook.
    I hope this helps!


    Simeon
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    11-18-2012
    Location
    usa
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Change Excel (2010) Row color per the value in the row-cell using VBA code

    Thank you Simeon,

    I appreciate your response.. it is working good..!

    Can I make it real time updating worksheet? I mean spreadsheet should change row color as soon as i mark a task - done/notdone/progress...!
    also is there way to change the row color only up to specific column?

    Thank you,
    Sandy

  4. #4
    Forum Contributor
    Join Date
    10-31-2012
    Location
    Maryland, USA
    MS-Off Ver
    Excel 2003/2007
    Posts
    145

    Re: Change Excel (2010) Row color per the value in the row-cell using VBA code

    Sandy,

    Let me see what I can do!

  5. #5
    Forum Contributor
    Join Date
    10-31-2012
    Location
    Maryland, USA
    MS-Off Ver
    Excel 2003/2007
    Posts
    145

    Re: Change Excel (2010) Row color per the value in the row-cell using VBA code

    Sandy,

    See if this works for you!


    Simeon
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    11-18-2012
    Location
    usa
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Change Excel (2010) Row color per the value in the row-cell using VBA code

    Thank you Simeon,

    It is perfect..!! I am getting all the required results..

    Can I put all the below code in Module instead of Sheet1?

    Please Login or Register  to view this content.
    In module i would like to specify the sheet name where i want to run the code..


    Thank you,
    Sandy

  7. #7
    Forum Contributor
    Join Date
    10-31-2012
    Location
    Maryland, USA
    MS-Off Ver
    Excel 2003/2007
    Posts
    145

    Re: Change Excel (2010) Row color per the value in the row-cell using VBA code

    I don't think it will automatically run if it is in Module. I believe it has to be in the spesific Sheet where you want the macro to run. But you can copy the entire code to any other Sheet in the Workbook and it should run just fine!


    Simeon
    Don't forget to click the star in this post!

+ 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