title: Skip blank rows when copy range to text file
body: <p>My procedure copy <em>Lg1</em> rows form an Excel range to a text file. I want to prevent  any <strong><em>blank</em></strong> row form being copied to the text file. First cells of each row contained this formula : <code>=IF(L39C7=0;"";L15C20)</code>. As you can see, the cell is or empty <strong><em>" "</em></strong>, or contains L15C20 value.</p>
  
  <p><strong>EDIT</strong> : here is one fulle row. All rows have same content:<code>[=IF(L39C7=0;"";L15C20)],[=IF(LC(-1)="";"";IF(L39C7&lt;0;"…";"5272"))],[=IF(LC(-2)="";"";IF(L41C7&lt;0;"…";"2302"))],[=IF(LC(-3)="";"";"salaire")],[=IF(LC(-4)="";"";"0")]</code></p>
  
  <p>Here is part of my code:</p>
  
  <pre><code>With ws
  Set RngSelect = .Range(Cells(FirstRow, FirstCol), Cells(31, LastCol)) 
  End with
  With RngSelect
  For Lg1 = 1 To (LastRow - FirstRow + 1)
      If .Cells(Lg1,1).Value &lt;&gt; "" Then  'Here is my issue
      Txt = Txt &amp; vbCrLf &amp; Join$(Application.Transpose(Application.Transpose(.Rows(Lg1).Value)), vbTab)
      Next
      End If
  End With
  Lg2 = FreeFile()
  Open FilePath For Append As #Lg2
  Print #Lg2, Mid$(Txt, Len(vbCrLf) + 1)
  Close Lg2
  </code></pre>
  
  <p>I have tried with no success various tests to evaluate If cell &lt;> " " but keep having blank rows in my text file. What shall I write to solve my issue?</p>
  
  <p>Thank you for help.</p>