Maybe someone could help me, Have some code and find only the first Cells(185,23) has work ,the Cells(186,23) (187.23) can't work....
VBA Code:
Sheets("PAU REJECT").Select
For Each vDEC In Range("W185:W220")
If vDEC <> "" Then
AA = Range("W65536").End(xlUp).Row
For Ad = 185 To AA
vDEC = Cells(Ad, 23)
vDECamt = Cells(Ad, 24)
EXEADM = Cells(Ad, 26)
EXEADMname = Cells(Ad, 27)
EXEADMNo = Cells(Ad, 28)
EXEADMType = Cells(Ad, 29)
If vDEC <> "" Then
Sheets("PAU Maintenance Record").Select
Columns(4).Select
Selection.Find(What:=vDEC, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
DecAC = Cells(ActiveCell.Row, 4)
DecACamt = Cells(ActiveCell.Row, 18)
DecFollowUp = Cells(ActiveCell.Row, 23)
If DecFollowUp = "" And DecAC = vDEC And DecACamt = vDECamt Then
Cells(ActiveCell.Row, 23).Select
Selection.Replace What:="", Replacement:="Advice", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Cells(ActiveCell.Row, 6).Select
Selection.Replace What:="*", Replacement:=EXEADMname, LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Cells(ActiveCell.Row, 7).Select
Selection.Replace What:="*", Replacement:=EXEADMNo, LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Cells(ActiveCell.Row, 8).Select
Selection.Replace What:="*", Replacement:=EXEADMType, LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Cells(ActiveCell.Row, 4).Select
Selection.Replace What:=vDEC, Replacement:=EXEADM, LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End If
End If
Next Ad
End If
Next vDEC