Hi,
I have a short loop that finds an account number in column B and then changes the value in column D in that row
my problem is once it no longer finds the value in the last rows it crashes - so I need an exit loop command.
Please see attached, this is my code so far:
Sub Test()
'Change UNALC to DESK for A0246074TRA
Range("B2").Select
Do
Range(ActiveCell, ActiveCell.End(xlDown)).Select
Selection.Find(What:="A0246074TRA", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(0, 2).Select
ActiveCell.FormulaR1C1 = "DESK"
ActiveCell.Offset(1, -2).Select
Range(ActiveCell, ActiveCell.End(xlDown)).Select
Loop
End Sub
Any help as always is much appreciated.
Change Test.xlsm