title: How To Keep Conditional Formatting When Sorting via VBA
body: <p>I have code that sorts a range on range change. It sorts the values but leaves the conditional formatting behind. How can I keep the conditional formatting?</p>
  
  <pre><code>Sub Worksheet_Change(ByVal Target As Range)
  If Not Intersect(Target, Range("range2rating")) Is Nothing Then
  Call deadlines1
  End If
  End Sub
  
  Sub deadlines1()
  Range("range2").Sort _
  Key1:=Range("range2rating"), Order1:=xlDescending
  End Sub
  </code></pre>