Consulting

Results 1 to 4 of 4

Thread: Highlight some of the cells in a row

  1. #1

    Highlight some of the cells in a row

    I have a worksheet that covers columns (for example) b to f

    I want a row to be highlighted when ever I select a cell in that row.

    I currently us
    .EntireRow.Interior.ColorIndex = 8
    but that selected all the row (!).... but I only want b to f

    Ant suggestions how I do it ?

  2. #2
    VBAX Regular
    Joined
    Jan 2011
    Posts
    35
    Location
    Try:-
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Cells(Target.Row, "B").Resize(, 5).Interior.ColorIndex = 8
    End Sub

  3. #3
    Hi Mick ... works perfectly ... many thanks

    Andrew

  4. #4
    VBAX Regular
    Joined
    Jan 2011
    Posts
    35
    Location
    You're welcome

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •