In the worksheet, it may have the "ABC" word in the cells. Now, i need write the marco to find out the "ABC" word. The action are:
1st press the marco button to move the 1st "ABC" word in corrsponding cell
2nd press the marco button to move the 2nd "ABC" word
3rd press the marco button to move the 3rd "ABC" word
.
.
Now, i only can find the 1st "ABC" word even i press the marco button many times from the below VBA command
Thanks
1st press the marco button to move the 1st "ABC" word in corrsponding cell
2nd press the marco button to move the 2nd "ABC" word
3rd press the marco button to move the 3rd "ABC" word
.
.
Now, i only can find the 1st "ABC" word even i press the marco button many times from the below VBA command
Code:
Sub FindFail()
Dim C As Range
Dim SheetNum As Integer
SheetNum = 1
Do While SheetNum <= Sheets.Count
Set C = Sheets(SheetNum).Cells.Find("Fail", Range("d41"), SearchOrder:=xlByColumns, LookIn:=xlValues)
If Not C Is Nothing Then
C.Activate
FindAddress =C.Address
Do
Set C = Sheets(SheetNum.Cells.FindNext(C)
Loop While Not C Is Nothing And C.Address <> FindAddress
End If
SheetNum= SheetNum+ 1
Loop
End Sub
Thanks