title: VBA Highlighting the selected row leads to selection of the entire row
body: <p>I made up a code that highlights the selected row. If selection changes - the newly selected row is highlighted and the previous selection's formatting returns to initial one. I use </p>
  
  <ul>
  <li>row 9 as highlight formatting sample and </li>
  <li>row 10 as baseline for conditional formatting of unselected rows. </li>
  </ul>
  
  <p>The code works fine. However, when the cell is selected, the row gets highlighted, the selected cell remains active BUT the whole row is selected. Can someone please help me to deselect everything except the target cell?</p>
  
  <p>Nothing from <a href="https://stackoverflow.com/questions/7180008/excel-select-vs-activate">here</a> helps.</p>
  
  <pre><code>Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  
  LastRowA = Range("A" &amp; Rows.Count).End(xlUp).Row
  
  If Target.Cells.Count &gt; 1 Or Target.Cells.Count &lt; 1 Then 'If selected 1 cell
      'Do nothing
  Else
      Application.ScreenUpdating = False
      If Target.Row &gt; 10 And Target.Row &lt; LastRowA + 1 Then
  
          Rows("10:10").Copy 'Restore all rows to custom conditional formatting of row 10
          For tableRow = 11 To LastRowA 
              Rows(tableRow &amp; ":" &amp; tableRow).PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
          Next tableRow
  
          Rows("9:9").Copy 'Highlight active row using formating of row #9
          Rows(Target.Row).PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
  
          Application.CutCopyMode = False
          Target.Cells.Activate 'Return Target to initially selected cell
      End If
      Application.ScreenUpdating = True
  End If
  
  End Sub
  </code></pre>