+ Reply to Thread
Results 1 to 2 of 2

Help with highlighting rows in a table

  1. #1
    Registered User
    Join Date
    06-22-2018
    Location
    England
    MS-Off Ver
    2013
    Posts
    15

    Help with highlighting rows in a table

    Hi,

    I am using the below code to highlight a selected row in a table by referencing the number in cell A11 and conditional formatting the table.

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)

    If Not Intersect(Target, Range("B8:L19")) Is Nothing Then
    Range("A11").Value = Target.row
    End If

    End Sub

    What i am wanting to do however is make the end of the table dynamic as the table will grow over time so new rows need to also highlight when selected.

    Does anyone have an idea how to best do that please?

    Thanks for any help given
    Last edited by Webz2k; 02-25-2019 at 08:04 AM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,543

    Re: Help with highlighting rows in a table

    One way:

    Please Login or Register  to view this content.

    Please note:

    Your post does not comply with Rule 2 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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 every next rows after a row containing specific text and splitting rows
    By Khalid.Noor in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-24-2018, 04:44 AM
  2. highlighting rows
    By JakeMann in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-05-2015, 12:04 PM
  3. [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
  4. [SOLVED] Highlighting Only Odd Rows
    By jedcadle in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-29-2013, 09:39 PM
  5. highlighting rows
    By legolas in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 05-31-2010, 07:17 AM
  6. Highlighting total rows in pivot table
    By jim37055 in forum Excel General
    Replies: 4
    Last Post: 12-15-2005, 01:35 PM
  7. Highlighting Rows
    By mem in forum Excel General
    Replies: 2
    Last Post: 10-26-2005, 07: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