Forum Discussion
LucasHernandez
Oct 14, 2020Copper Contributor
VBA not translating FormulaR1C1 index
So everytime i try to use a VBA code like this to insert an index function:
Range("K2").Select
ActiveCell.FormulaR1C1 = _
"=INDEX(RC[-1],MATCH(RC[-1],RC[-1],0))"
in K2 it gives back something like:
=@Index(J2;CORRESP(J2;J2;0))
I assume there would be not much of a problem, but i use the pt-br version of excel, so it doesnt translate the index part to the pt-br formula name, i have tried using Formula2, but it only takes out the @ and if i use something like
ActiveCell.FormulaR1C1 = _
"=índice(RC[-1],match(RC[-1],RC[-1],0))"
the formula only works if i press F2 + enter on it afterwards.
1 Reply
Sort By
- JKPieterseSilver Contributor
LucasHernandez Does it work if you use code like this:
ActiveCell.Formula = "=Index(J2,MATCH(J2,J2,0))"