title: Comparing two cells every nth row via Conditional Formatting
body: <p>I am looking to create conditional formatting rules which compare two sets of text to see if they match, highlighting the second entry red if they do not.  The content is being manually entered on the second row and we have 3 rows in between which is creating a problem.  I am only comparing Text2 to Text1, Text 4 to Text 3, etc.</p>
  <p>Text1</p>
  <p>Text2</p>
  <p>3 Rows</p>
  <p>Text3</p>
  <p>Text4</p>
  <p>(Pattern repeats for 500 entries)</p>
  <p>I haven't found a way to do this with a single rule (if you know this would be awesome!) so I had a thought to use a macro to create a new rule for each comparison and repeat it the required number of times.</p>
  <pre><code>Range(&quot;J2&quot;).Select
  Dim i As Integer
  For i = 1 To 250
  
  Selection.FormatConditions.Add Type:=xlExpression, Formula1:=&quot;J1=J2&quot;
  Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
  With Selection.FormatConditions(1).Interior
      .PatternColorIndex = xlAutomatic
      .Color = 255
      .TintAndShade = 0
  End With
  Selection.FormatConditions(1).StopIfTrue = False
  ActiveCell.Offset(5, 0).Select
  Next i
  </code></pre>
  <p>End Sub</p>
  <p>The main problem is the rows in between so I can't create a single conditional formatting formula and copy down.  The problem with my VBA code is Formula1 is hardcoded.  It should compare J1=J2, then J6=7, etc.</p>
  <p>Anyone know a good solution?</p>
  <p>Thanks.</p>