+ Reply to Thread
Results 1 to 9 of 9

Conditional Formatting - Format row based on cell value in specific column

  1. #1
    Registered User
    Join Date
    08-20-2013
    Location
    NZ
    MS-Off Ver
    Excel 2010
    Posts
    17

    Conditional Formatting - Format row based on cell value in specific column

    Hi guys,

    I want to apply conditional formatting via VBA. I know I could do it in about 2 seconds using standard conditional formatting but the users of the spreadsheet copy and paste and drag to fill, and past experience has shown that this screws up the conditional formatting. I'm also aware that I could stop them doing this, but it's not worth the drama

    So, I guess I would like an event to run after a cell in column H (Status) is updated, if value = "Open", format that row to fill yellow.

    For what it's worth, I've attached the spreadsheet. New Walkthroughs.xlsm

    Any help greatfully received...

    Thanks.
    Last edited by Kite3; 10-06-2013 at 08:59 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Conditional Formatting - Format row based on cell value in specific column

    Hi,

    Try this code in the worksheet module (this will replace your current Worksheet_Change event):
    Please Login or Register  to view this content.
    Hope this helps

  3. #3
    Registered User
    Join Date
    08-20-2013
    Location
    NZ
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Conditional Formatting - Format row based on cell value in specific column

    Awesome! Thank you ajryan88. Works like a charm

  4. #4
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Conditional Formatting - Format row based on cell value in specific column

    No problems.

    Please don't forget to mark this thread as solved and please click on the * next to my post to say thanks

  5. #5
    Registered User
    Join Date
    08-20-2013
    Location
    NZ
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Conditional Formatting - Format row based on cell value in specific column

    Hey ajryan88,

    How difficult would it be to add another condition to this code? We now need 2 conditional formats. Yellow if status = "Open" (which we already did), or, if the title (column F) = "Audit NC" AND status = "Open" fill green...

    I have had a wee play with it, but to no effect as yet. (It's not crapping out, but it's not working either!)

  6. #6
    Registered User
    Join Date
    08-20-2013
    Location
    NZ
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Conditional Formatting - Format row based on cell value in specific column

    Can anyone else help me with this?

    How difficult would it be to add another condition to this code? We now need 2 conditional formats. Yellow if status = "Open" (which we already did), or, if the title (column F) = "Audit NC" AND status = "Open" fill green...

  7. #7
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,376

    Re: Conditional Formatting - Format row based on cell value in specific column

    Hi Kite3,
    maybe so
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    08-20-2013
    Location
    NZ
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Conditional Formatting - Format row based on cell value in specific column

    Hey Nilem, thanks for the code. It's not working though. Still goes yellow but not doing the green. Have attached a copy of the s/s.

    New Walkthroughs 3.xlsm

  9. #9
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,376

    Re: Conditional Formatting - Format row based on cell value in specific column

    Kite, remove all conditional formatting rules in your file to see the green fill.

+ 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: 08-17-2012, 08:16 PM
  2. [SOLVED] Macros imitating conditional formatting based on specific text within cell
    By schaasyd in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-15-2012, 06:30 PM
  3. Replies: 5
    Last Post: 05-03-2012, 06:06 PM
  4. Replies: 2
    Last Post: 12-21-2011, 06:01 PM
  5. Conditional Format of Specific Cell in Variable Length Column
    By NoCanDo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-26-2008, 05:05 AM

Tags for this Thread

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