P
Pete
Can some one tell me how to set up this code as a loop
statment.
here is the code I have.
Sub MoveUSDown()
Application.ScreenUpdating = False
Cells.Find(What:="no:", After:=ActiveCell,
LookIn:=xlValues, LookAt:= _
xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext, MatchCase:=True). _
Activate
ActiveCell.Offset(0, 3).Range("A1").Select
ActiveCell.Name = "MoveUS1"
Cells.Find(What:="Totals in USD:",
After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext, _
MatchCase:=False).Activate
Cells.FindNext(After:=ActiveCell).Activate
ActiveCell.Offset(0, 3).Range("A1").Select
ActiveCell.Name = "MoveUS2"
Range("MoveUS1:MoveUS2").Select
Selection.Cut Destination:=ActiveCell.Offset(1, 0)
Range("W3").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-21]=RC[3],""Y"",IF(RC
[3]="""",""A"",""no:""))"
Range("W3").Select
Selection.AutoFill Destination:=Range("W3:W219")
Range("MoveUS2").Select
ActiveWorkbook.Names("MoveUS2").Delete
Range("MoveUS1").Select
ActiveWorkbook.Names("MoveUS1").Delete
ActiveCell.Offset(-1, -3).Range("A1").Select
Selection.ClearContents
End Sub
What I want to do is look for the word "no:". If the macro
finds it then I want the macro to preform until it can't
find "no:", then exit the loop and end.
Thanks for any help.
Pete
statment.
here is the code I have.
Sub MoveUSDown()
Application.ScreenUpdating = False
Cells.Find(What:="no:", After:=ActiveCell,
LookIn:=xlValues, LookAt:= _
xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext, MatchCase:=True). _
Activate
ActiveCell.Offset(0, 3).Range("A1").Select
ActiveCell.Name = "MoveUS1"
Cells.Find(What:="Totals in USD:",
After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext, _
MatchCase:=False).Activate
Cells.FindNext(After:=ActiveCell).Activate
ActiveCell.Offset(0, 3).Range("A1").Select
ActiveCell.Name = "MoveUS2"
Range("MoveUS1:MoveUS2").Select
Selection.Cut Destination:=ActiveCell.Offset(1, 0)
Range("W3").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-21]=RC[3],""Y"",IF(RC
[3]="""",""A"",""no:""))"
Range("W3").Select
Selection.AutoFill Destination:=Range("W3:W219")
Range("MoveUS2").Select
ActiveWorkbook.Names("MoveUS2").Delete
Range("MoveUS1").Select
ActiveWorkbook.Names("MoveUS1").Delete
ActiveCell.Offset(-1, -3).Range("A1").Select
Selection.ClearContents
End Sub
What I want to do is look for the word "no:". If the macro
finds it then I want the macro to preform until it can't
find "no:", then exit the loop and end.
Thanks for any help.
Pete