Mortadella
Member
I am trying to write a Do Until loop and everything works alright except when it gets to "B1" it keeps running and then the loop destroys all the work.
I am trying to figure out two things:
1: When does the Do test actually happen?
2: How do I end the loop if my current test isn't working?
I am trying to figure out two things:
1: When does the Do test actually happen?
2: How do I end the loop if my current test isn't working?
Code:
Do Until ActiveCell.Value = "B1"
Selection.End(xlUp).Select
If ActiveCell.Address = ("B1") Then
Range("A1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(-1, 0).Activate
ActiveCell.FormulaR1C1 = "***"
Selection.End(xlUp).Select
Selection.Copy
ActiveCell.End(xlDown).Select
Range(ActiveCell, ActiveCell.End(xlUp)).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Loop