I'm timing out when running the following (pressing escape debugs on the RED below):
'moving data from "Solicitation File" if the value in Column V is null - it is copying to the new worksheet, but never completes - stalls at "If CStr(xRg(K).Value) = "" Then" - data is getting to the new sheet, but the module hangs.
Sub MoveNoPhone()
With ThisWorkbook
.Sheets.Add(After:=.Sheets(.Sheets.Count)).Name = "No Phone"
End With
Dim xRg As Range
Dim xCell As Range
Dim i As Long
Dim J As Long
Dim K As Long
i = Worksheets("Solicitation File").UsedRange.Rows.Count
J = Worksheets("No Phone").UsedRange.Rows.Count
If J = 1 Then
If Application.WorksheetFunction.CountA(Worksheets("No Phone").UsedRange) = 0 Then J = 0
End If
Set xRg = Worksheets("Solicitation File").Range("V2:V" & i)
On Error Resume Next
Application.ScreenUpdating = False
For K = 1 To xRg.Count
If CStr(xRg(K).Value) = "" Then
xRg(K).EntireRow.Copy Destination:=Worksheets("No Phone").Range("A" & J + 1)
xRg(K).EntireRow.Delete
If CStr(xRg(K).Value) = "" Then
K = K - 1
End If
J = J + 1
End If
Next
Cells.Select
Columns.EntireColumn.AutoFit
Cells.EntireRow.AutoFit
Application.ScreenUpdating = True
End Sub
'moving data from "Solicitation File" if the value in Column V is null - it is copying to the new worksheet, but never completes - stalls at "If CStr(xRg(K).Value) = "" Then" - data is getting to the new sheet, but the module hangs.
Sub MoveNoPhone()
With ThisWorkbook
.Sheets.Add(After:=.Sheets(.Sheets.Count)).Name = "No Phone"
End With
Dim xRg As Range
Dim xCell As Range
Dim i As Long
Dim J As Long
Dim K As Long
i = Worksheets("Solicitation File").UsedRange.Rows.Count
J = Worksheets("No Phone").UsedRange.Rows.Count
If J = 1 Then
If Application.WorksheetFunction.CountA(Worksheets("No Phone").UsedRange) = 0 Then J = 0
End If
Set xRg = Worksheets("Solicitation File").Range("V2:V" & i)
On Error Resume Next
Application.ScreenUpdating = False
For K = 1 To xRg.Count
If CStr(xRg(K).Value) = "" Then
xRg(K).EntireRow.Copy Destination:=Worksheets("No Phone").Range("A" & J + 1)
xRg(K).EntireRow.Delete
If CStr(xRg(K).Value) = "" Then
K = K - 1
End If
J = J + 1
End If
Next
Cells.Select
Columns.EntireColumn.AutoFit
Cells.EntireRow.AutoFit
Application.ScreenUpdating = True
End Sub