Hello.
So, I'm trying to do a loop array formula that autofills till the last row dynamically. If anyone can do this, can you please help?
Sub Formula1_a ()
Range("A2").Select
ActiveCell.FormulaR1C1 = Evaluate("=MID($A2,FIND(""*"",SUBSTITUTE($A2,""\"",""*"",LEN($A2)-LEN(SUBSTITUTE($A2,""\"",""""))))+1,LEN($A2))")
Selection.AutoFill Destination:=Range("B2:B" & Range("A" & Rows.Count).End(xlUp).Row)
Range(Selection, Selection.End(xlDown)).Select
End Sub
Also, how do you use Evaluate() with Search() in VBA?
Edit: Found that it was impossible to do so. In which case, what is the vba version of this?
Evaluate("=MID($A2,FIND(""*"",SUBSTITUTE($A2,""\"",""*"",LEN($A2)-LEN(SUBSTITUTE($A2,""\"",""""))))+1,LEN($A2))")
Bookmarks