I have a sheet that I need to export to a text file, but in my excel file some cells are blank because of the formula.
On the text file those blank cells are still there and i have to manually delete them. To solve this problem I`m using this code

    For Each c In Range("A2:A2000")
        If c.Value <> "X" Then
            c.EntireRow.Delete
        End If
    Next
    
    Sheets("XPS_final").Select
    Sheets("XPS_final").Copy
    Rows("1:1").Select
    Selection.Delete Shift:=xlUp
    ActiveWorkbook.SaveAs Filename:="C:\Temporal\Para macros\" + Name + "_Final.txt", _
        FileFormat:=xlTextPrinter, CreateBackup:=False
    ActiveWindow.Close
    ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
    Sheets("variables").Select
It works fine, but the For Each block takes a little bit to run. Any idea on how to improve this?