Hi Mr. Excel users,
I have a simple problem that needs to be corrected. Here is my code:
~~~~~~~~~~~~~~
For Num = 1 To TotalDuplicatePerCase
Rows (1) .Find (What: = "New Value"). Select
ActiveCell.Offset (Num, 0) .Select
On Error GoTo abc:
ActiveCell.Find (What: = "Pending", After: = ActiveCell, LookIn: = xlFormulas, _
LookAt: = xlPart, SearchOrder: = xlByRows, SearchDirection: = xlNext, _ MatchCase
: = False, SearchFormat: = False) .Activate
On Error GoTo 0
X = ActiveCell.Offset (0, -3) .Value
Next Num
abc:
Resume Next
End Sub
~~~~~~~~~~~~~~~~~
What I wanted to happen, is when the LOOP starts at the beginning, so the macro does not go to run X = ActiveCell.Offset (0, -3) .Value code.
Appreciate your help.
I have a simple problem that needs to be corrected. Here is my code:
~~~~~~~~~~~~~~
For Num = 1 To TotalDuplicatePerCase
Rows (1) .Find (What: = "New Value"). Select
ActiveCell.Offset (Num, 0) .Select
On Error GoTo abc:
ActiveCell.Find (What: = "Pending", After: = ActiveCell, LookIn: = xlFormulas, _
LookAt: = xlPart, SearchOrder: = xlByRows, SearchDirection: = xlNext, _ MatchCase
: = False, SearchFormat: = False) .Activate
On Error GoTo 0
X = ActiveCell.Offset (0, -3) .Value
Next Num
abc:
Resume Next
End Sub
~~~~~~~~~~~~~~~~~
What I wanted to happen, is when the LOOP starts at the beginning, so the macro does not go to run X = ActiveCell.Offset (0, -3) .Value code.
Appreciate your help.
Last edited by a moderator: