+ Reply to Thread
Results 1 to 14 of 14

HightLight Rows conditions

  1. #1
    Forum Contributor
    Join Date
    10-29-2012
    Location
    Laos
    MS-Off Ver
    Excel 2003,2010,2013
    Posts
    126

    HightLight Rows conditions

    Hi All,

    I would like to have macro that highlight the row base on condition below:
    Example:
    if the cell column D contain X1, then highlight the row with light yellow

    as attached file below
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: HightLight Rows conditions

    Unless you have a really huge table, you dont need VBA for this, Conditional Formatting will give you what you want.

    1. highlight the range you want to apply the conditional formatting to (=$A$8:$AL$19 in your sample)
    2. on the home tab, styles, select CF
    3. select new rule, select use formula
    4. enter =$D8="X1" format fill as needed
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    10-29-2012
    Location
    Laos
    MS-Off Ver
    Excel 2003,2010,2013
    Posts
    126

    Re: HightLight Rows conditions

    I have try it, but when i delete all rows, and put some new data, then i have to do Conditional Formatting again
    how can i do?

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: HightLight Rows conditions

    When you delete the entire row, then you romove the row completely, and delete everything in it. Rather than delete the row, delete the cell contents

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: HightLight Rows conditions

    vba
    To a sheet module
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    10-29-2012
    Location
    Laos
    MS-Off Ver
    Excel 2003,2010,2013
    Posts
    126

    Re: HightLight Rows conditions

    Hi Jindon and All,

    That what i need, now is working with the sample,
    can i ask for more help, if i change the condition like... number such as 590, 580, 570 Etc..
    it the row is not high light, it is possible to make it flexible?

    Sample file attached below:
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    10-29-2012
    Location
    Laos
    MS-Off Ver
    Excel 2003,2010,2013
    Posts
    126

    Re: HightLight Rows conditions

    please help

  8. #8
    Forum Contributor
    Join Date
    10-29-2012
    Location
    Laos
    MS-Off Ver
    Excel 2003,2010,2013
    Posts
    126

    Re: HightLight Rows conditions

    please help

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: HightLight Rows conditions

    Don't understand what you are trying to do.

  10. #10
    Forum Contributor
    Join Date
    10-29-2012
    Location
    Laos
    MS-Off Ver
    Excel 2003,2010,2013
    Posts
    126

    Re: HightLight Rows conditions

    Hi Jindon,

    Need to use the condition to highlight the row,
    If cell in column D, contains base on conditions, then highlight ROW, when i change to other condition such as number, alphabet, it not change

    please see the sample file below:
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    10-29-2012
    Location
    Laos
    MS-Off Ver
    Excel 2003,2010,2013
    Posts
    126

    Re: HightLight Rows conditions

    Hi Jindon,

    Need to use the condition to highlight the row,
    If cell in column D, contains base on conditions, then highlight ROW, when i change to other condition such as number, alphabet, it not change

    please see the sample file below:
    Attached Files Attached Files

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

    Re: HightLight Rows conditions

    Try formatting your cells E2:E5 and D8:D19 as number.

  13. #13
    Forum Contributor
    Join Date
    10-29-2012
    Location
    Laos
    MS-Off Ver
    Excel 2003,2010,2013
    Posts
    126

    Re: HightLight Rows conditions

    Hi John,

    I have try to change formatting to number, but result still the same, not change
    how can i do?

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

    Re: HightLight Rows conditions

    This works for me on your sample.

    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. Macro that will hightlight a cell and four rows to right based on text in cell:
    By Chad Bateman in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-07-2014, 02:13 PM
  2. compare 2 rows and hightlight chnages
    By steve111 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-03-2014, 04:20 AM
  3. Comparing 2 WB's with identical rows and columns, then Hightlight the differences
    By crispybadger in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-13-2013, 05:17 PM
  4. How to hightlight a row?
    By John K in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-17-2008, 12:57 PM
  5. Automatically Hightlight Rows with w/Date Check?
    By Al Franz in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-18-2005, 10:05 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