Dynamic variable in VBA
3 answers
This is a possible solution:
Public Sub TestMe()
Dim i As Long
For i = 2 To 10
Cells(i, 5) = "=StripAccent(C" & i & ")"
Next i
End Sub
Another is the use Cells(i,3)
.
Edit: If you use a custom function here - Convert Special Characters to Alphabet , then something like this might work (but not like a formula):
Public Sub TestMe()
Dim i As Long
For i = 2 To 10
Cells(i, 5) = StripAccent(Cells(i,3))
Next i
End Sub
+3
source to share