+ Reply to Thread
Results 1 to 6 of 6

Shade Row based on Conditional Formatting

  1. #1
    Registered User
    Join Date
    01-10-2013
    Location
    Tallahassee
    MS-Off Ver
    Excel 2010
    Posts
    30

    Shade Row based on Conditional Formatting

    I have useful data in Columns A:K. The data (headings) start in Row 4.
    Columns M and N have tag data.
    I would like to shade the data in rows A:K if the following conditions are met:
    *Col M is "Y"
    *Col N does NOT equal "Include"

    If both conditions are not met for that row, that row (from A:K) should not be shaded.

    I recorded the macro below and it works. It adds a conditional format in the worksheet.
    However, how would I simplify this code to say: shade those rows where M =X and N is not equal to "Include" without adding a conditional format?

    Thank you.

    Please Login or Register  to view this content.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Shade Row based on Conditional Formatting

    It is not clear what you want, since you "recorded the macro below and it works." Are you asking how to use VBA to permanently shade those rows based on that rule, rather than using VBA to create a Conditional Formatting rule to do it?

    Also, first you say column M = "Y" then your code says column M = "X". Please clarify.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    01-10-2013
    Location
    Tallahassee
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Shade Row based on Conditional Formatting

    Sorry for the confusion: M=X and N is NOT equal to "Include"

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Shade Row based on Conditional Formatting

    You didn't answer the more important question.
    Quote Originally Posted by 6StringJazzer View Post
    [...]you "recorded the macro below and it works." Are you asking how to use VBA to permanently shade those rows based on that rule, rather than using VBA to create a Conditional Formatting rule to do it?

  5. #5
    Registered User
    Join Date
    01-10-2013
    Location
    Tallahassee
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Shade Row based on Conditional Formatting

    Yes. I apologize. I would like to shade the rows based on the two conditions without resorting to conditional formatting.

    Once again, I apologize, for not being clear.

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Shade Row based on Conditional Formatting

    Does this help?

    Please Login or Register  to view this content.

+ 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. Conditional formatting to shade blocks of rows
    By MRSH in forum Excel General
    Replies: 2
    Last Post: 07-23-2015, 07:16 AM
  2. Use conditional formatting to shade cells between two dates
    By vandeverja in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-27-2014, 11:58 AM
  3. shade cells based on shift time (Conditional formatting?)
    By dys0n in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-02-2014, 03:01 PM
  4. Replies: 3
    Last Post: 07-28-2013, 10:24 PM
  5. Replies: 2
    Last Post: 12-17-2011, 08:13 AM
  6. Replies: 7
    Last Post: 12-17-2010, 03:17 AM
  7. shade row without conditional formatting?
    By Wizard33 in forum Excel General
    Replies: 9
    Last Post: 03-12-2010, 05:13 PM

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