Forum Discussion
MalikIF
Jan 21, 2020Copper Contributor
Recording Excel Macro in R1C1 Style
Dear Microsoft tech community, Assistance need, recent update on Office 365, Excel macro recording is done on R1C1 style. Range("H8").Select ActiveCell.FormulaR1C1 = "=VLOOKUP(R5C8,R2C1...
JKPieterse
Jan 22, 2020Silver Contributor
MalikIF The macro recorder records formulas in R1C1 style, there is no way to change that I'm afraid. The up side of that is that if you have to change the location where the formula is written, the formula in the macro does not need to be edited. To set formulas in A1 style, edit your code to:
ActiveCell.Formula = "=VLOOKUP(H5,A2:E15,3,0)"