AhmedAbbas
New Member
Appreciate your guidance in looking and telling me what is wrong in the code below
Sub acc()
Dim I As Integer
Dim AA As Integer
Dim B As Integer
AA = 16
B = (Range("b16").End(xlDown).Row)
For I = AA To B
Range("J" & I).Value = Application.WorksheetFunction.If(Range("P" & I).Value <> 0, Application.WorksheetFunction.VLookup(Range("B" & I), Sheets("ACC").Range("B2:C5"), 2, False), "")
Next I
End Sub
_____________________________________________________________
Post Moved by Moderator
.
Sub acc()
Dim I As Integer
Dim AA As Integer
Dim B As Integer
AA = 16
B = (Range("b16").End(xlDown).Row)
For I = AA To B
Range("J" & I).Value = Application.WorksheetFunction.If(Range("P" & I).Value <> 0, Application.WorksheetFunction.VLookup(Range("B" & I), Sheets("ACC").Range("B2:C5"), 2, False), "")
Next I
End Sub
_____________________________________________________________
Post Moved by Moderator
.
Last edited by a moderator: