+ Reply to Thread
Results 1 to 5 of 5

highlight columns A:M based on cell value

  1. #1
    Forum Contributor
    Join Date
    08-17-2009
    Location
    West Midlands
    MS-Off Ver
    Excel 2016
    Posts
    213

    highlight columns A:M based on cell value

    Hi all,

    This is probably an easy one for you genii - but it has me frustrated.

    I am working on a spreadsheet that will be used by Excel 2003 users. Each row in the data is given a letter code, A, D, R or I. Based upon this letter the corresponding row needs to be a specific colour. Due to the limited number of conditional formats in Excel 2003 I am using VB to achieve this affect:

    Please Login or Register  to view this content.
    This code works fine to highlight the whole row, but how do I adapt this to highlight only rows A:M?

    Any help as always greatly appreciated,

    SA

  2. #2
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: highlight columns A:M based on cell value

    Hi try this code
    Please Login or Register  to view this content.
    rather for small ranges with large quantities of rows it could be slow a little
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  3. #3
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: highlight columns A:M based on cell value

    then change these lines from

    Please Login or Register  to view this content.
    To

    Please Login or Register  to view this content.
    Please take time to read the forum rules

  4. #4
    Forum Contributor
    Join Date
    08-17-2009
    Location
    West Midlands
    MS-Off Ver
    Excel 2016
    Posts
    213

    Re: highlight columns A:M based on cell value

    Thanks for taking the time to reply guys. So, is this the code you're asking me to try - if so, it seems to only sporadically highlight rows (each row contains a letter - so each row should be highlighted a colour):

    Please Login or Register  to view this content.

    SA

    EDIT: This code seems to work fine for new lines added to the data but existing lines don't change colour if the letter is changed.
    Last edited by SAsplin; 06-28-2012 at 10:48 AM.

  5. #5
    Forum Contributor
    Join Date
    08-17-2009
    Location
    West Midlands
    MS-Off Ver
    Excel 2016
    Posts
    213

    Re: highlight columns A:M based on cell value

    Right then,

    I've had a play about and by combining your suggestions with my original script, this seems to work:

    Please Login or Register  to view this content.
    SA

+ 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