kutbishikari
New Member
- Joined
- Apr 12, 2011
- Messages
- 3
here is my code
Sub hawally()
Application.ScreenUpdating = False
Set i = Sheets("Sheet3")
Set e = Sheets("HW")
Dim d As Integer
Dim j As Integer
d = 1
j = 2
e.Range("A2:D100").Clear
Do Until IsEmpty(i.Range("D" & j))
If i.Range("D" & j) > 0 Then
d = d + 1
e.Range("A" & d & ":D" & d & "").Value = i.Range("A" & j & ":D" & j & "").Value
End If
j = j + 1
Loop
Sheets("HW").Select
Application.ScreenUpdating = True
End Sub
my sheet has 700 rows with 10 columns , somewhere no numbers in the loop column , then it giving me mis type error and exit sub ,
i would like to go next by skip that error
my sheet look like
A B C D
df fr gt 8
df fr gt 6
df fr gt 4
df fr gt #value!
df fr gt 7
df fr gt 6
i would like to get result as below :
df fr gt 8
df fr gt 6
df fr gt 4
df fr gt 7
df fr gt 6
Sub hawally()
Application.ScreenUpdating = False
Set i = Sheets("Sheet3")
Set e = Sheets("HW")
Dim d As Integer
Dim j As Integer
d = 1
j = 2
e.Range("A2:D100").Clear
Do Until IsEmpty(i.Range("D" & j))
If i.Range("D" & j) > 0 Then
d = d + 1
e.Range("A" & d & ":D" & d & "").Value = i.Range("A" & j & ":D" & j & "").Value
End If
j = j + 1
Loop
Sheets("HW").Select
Application.ScreenUpdating = True
End Sub
my sheet has 700 rows with 10 columns , somewhere no numbers in the loop column , then it giving me mis type error and exit sub ,
i would like to go next by skip that error
my sheet look like
A B C D
df fr gt 8
df fr gt 6
df fr gt 4
df fr gt #value!
df fr gt 7
df fr gt 6
i would like to get result as below :
df fr gt 8
df fr gt 6
df fr gt 4
df fr gt 7
df fr gt 6