Trevor G
Well-known Member
- Joined
- Jul 17, 2008
- Messages
- 6,842
- Office Version
- 365
- Platform
- Windows
I have the following code to clean a download CSV file, but it is leaving entries that has #Name which then requries a manual filter. How can I run the same code to remove these lines. The code I use is shown below@
Sub strip2()
'*********************************************
'The following code was created by Trevor G 31 March 2010
'Email
'The following code will strip away any text entries
'Or blank rows in the database extract
'Then it will convert the numbers in the MI Reference Column (A)
'Into A Number format
'*********************************************
Dim lngRow As Long
Range("K1048576").Select 'Range("k65536").Select
ActiveCell.End(xlUp).Select
lngRow = ActiveCell.Row + 1
Range("A2").Select
Do Until ActiveCell.Row = lngRow
If Not IsNumeric(ActiveCell.Value) Or ActiveCell.Value = "" Then
ActiveCell.EntireRow.Delete
lngRow = lngRow - 1
Else
ActiveCell.Offset(1, 0).Select
End If
Loop
End Sub
Sub strip2()
'*********************************************
'The following code was created by Trevor G 31 March 2010
'The following code will strip away any text entries
'Or blank rows in the database extract
'Then it will convert the numbers in the MI Reference Column (A)
'Into A Number format
'*********************************************
Dim lngRow As Long
Range("K1048576").Select 'Range("k65536").Select
ActiveCell.End(xlUp).Select
lngRow = ActiveCell.Row + 1
Range("A2").Select
Do Until ActiveCell.Row = lngRow
If Not IsNumeric(ActiveCell.Value) Or ActiveCell.Value = "" Then
ActiveCell.EntireRow.Delete
lngRow = lngRow - 1
Else
ActiveCell.Offset(1, 0).Select
End If
Loop
End Sub