title: Copy values from a row to another workbook by VBA
body: <p>I have this code to copy rows from a sheet to another if the condition is true, but I have a little problem. The cells of Sheet1 have formulas and I want to paste just the values to Sheet2.
  How can I do this in this code?</p>
  
  <pre><code>Sub CopyRows()     
    Dim cell As Range
    Dim lastRow As Long, i As Long
    Dim FName As String
    Dim FPath As String
    Dim NewBook As Workbook
  
    lastRow = Range("A" &amp; Rows.Count).End(xlUp).Row
  
    i = 1
  
    For Each cell In Sheets("Sheet1").Range("T1:T" &amp; lastRow)
      If cell.Value = "X" Or cell.Value = "Y" Then          
        cell.EntireRow.Copy Sheets("Sheet2").Cells(i + 1, 1)
        i = i + 1
      End If        
    Next
  End Sub
  </code></pre>