title: Identifying and highlighting a blank row in Excel VBA
body: <p>Scenario: Each row would contain 23 columns; 20 would contain user populated data and the last 3 would be autogenerated through vba. 
  While running if the vba code identifies the first 20 columns of any row to be blank cells then the whole row is declared blank and highlighted.</p>
  
  <p>I have been able to write the following code:</p>
  
  <pre><code> For Each rng In Range("A1:A" &amp; LastRow)
      With rng
      If .Value &lt; 1 Then
          MsgBox "Blank Cell found"
          blnkcnt = 0
      For Each mycl In Range("A" &amp; ActiveCell.Row &amp; ":T" &amp; ActiveCell.Row)
          With mycl
              If .Value &lt; 1 Then
                  blnkcnt = blnkcnt + 1
              End If
          End With
      Next mycl
  
  
      If blnkcnt = 20 Then
          lCount = lCount + 1
          With .EntireRow.Interior
              .ColorIndex = 6
              .Pattern = xlSolid
              .PatternColorIndex = xlAutomatic
          End With
      End If
  End If
  End With
  Next rng
  
  If lCount &gt; 0 Then
     MsgBox "Data contains blank row(s): " &amp; lCount
  End
  
  Else
      MsgBox "No blank Rows"
  End If
  </code></pre>