cacahuatitaCH
New Member
- Joined
- Jan 8, 2021
- Messages
- 12
- Office Version
- 365
- Platform
- Windows
So, I found this looping code and adapted it a bit, pretty superficial changes.
It works well for the first instance, finds the text I asked it to, changes the next row... but after that, it keeps changing the text in the cell it finds the actual text its supposed to be looking for as a reference.
Could you help me find the mistake?
It works well for the first instance, finds the text I asked it to, changes the next row... but after that, it keeps changing the text in the cell it finds the actual text its supposed to be looking for as a reference.
Could you help me find the mistake?
VBA Code:
Sub Default_test()
Dim Ary As Variant
Dim i As Long
Ary = Array("Actual Results", "BLANK")
With ActiveSheet.Range("A5:F550")
For i = 0 To UBound(Ary) Step 2
.Replace Ary(i), "=" & Ary(i), xlWhole, , False, , False, False
.SpecialCells(xlFormulas, xlErrors).Offset(1, 0).Value = Ary(i + 1)
.Replace "=" & Ary(i), Ary(i), xlWhole, , False, , False, False
Next i
End With
MsgBox "DONE!"
End Sub