+ Reply to Thread
Results 1 to 9 of 9

Conditional Highlighting of Rows

  1. #1
    Registered User
    Join Date
    06-09-2014
    Posts
    39

    Conditional Highlighting of Rows

    Hi,

    I have a program that compiles a whole bunch of annual data.

    The data is in columns A:J

    I would like to have a program that loops through column A's entries and if the entries are odd then have the cells in Columns A through J of that row be highlighted with colour index RGB (193, 205, 205).

    This is what I have below, but it is not working and I am having trouble finding online guidance.

    Thanks,

    Please Login or Register  to view this content.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Conditional Highlighting of Rows

    Try

    Please Login or Register  to view this content.
    Martin

  3. #3
    Registered User
    Join Date
    06-09-2014
    Posts
    39

    Re: Conditional Highlighting of Rows

    Hi,

    So I just tried this, but my debugger prompts me claiming there is still an error in the line:

    Please Login or Register  to view this content.
    Any thoughts?

  4. #4
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Conditional Highlighting of Rows

    Try

    Please Login or Register  to view this content.
    ColorIndex just allows a limited number of integer values

  5. #5
    Registered User
    Join Date
    06-09-2014
    Posts
    39

    Re: Conditional Highlighting of Rows

    Made the change, but still no luck.

    Sorry to be pestering.

  6. #6
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Conditional Highlighting of Rows

    How is lrow defined? Are you sure that it has the correct value? Suggest putting a breakpoint on the second line and hovering over lrow to see what value it has.

  7. #7
    Registered User
    Join Date
    06-09-2014
    Posts
    39

    Re: Conditional Highlighting of Rows

    lrow is defined in an earlier procedure of the program. I have included the snipits of the earlier procedure:

    Sorry, I am very new to VBA, so when you suggest putting a breakpoint on the second line and hovering over lrow, I'm not sure how to execute that.

    Thanks all the same.

    Please Login or Register  to view this content.

  8. #8
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Conditional Highlighting of Rows

    Something a bit long but it seems working
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    06-09-2014
    Posts
    39

    Re: Conditional Highlighting of Rows

    Thank you this worked wonderfully.

    Now I will have to sit and go through it to figure out exactly what it is doing

    Thanks so much.

+ 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. [SOLVED] Highlighting multiple rows through a worksheet depending a cell value in the rows
    By loked in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-19-2014, 01:31 AM
  2. [SOLVED] Conditional Formatting and Highlighting
    By lenoble22 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-05-2013, 02:24 AM
  3. Conditional Highlighting through a Range
    By NeoFlex in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-28-2013, 02:30 PM
  4. Conditional Formating - Highlighting Rows
    By snoopy1461 in forum Excel General
    Replies: 3
    Last Post: 12-08-2011, 10:30 AM
  5. Replies: 2
    Last Post: 04-14-2011, 12:34 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