Hey all
Im working on automating a few processes. I consider myself pretty proficient with VBA and can write code from scratch buuuut im also very very very lazy. So one trick i like to do is record a macro, then edit the code to clean it up and add more functionality to it.
Recently created a macro that creates a new column, adds a vlookup formula to a certain cell and then drags that cell down the column. That formula is as follows "=VLOOKUP(J2, Key!$B$1:$E$50, 3, FALSE)"
In the VBA that was generated by recording a macro while entering the formula is: ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[5], Key!R1C2:R50C5, 3, FALSE)"
Just wondering if someone could explain this difference to me? ive never seen this RC[5] or R1C2:R50C5 so im not sure what these mean. Can someone explain how this works? i mean, i understand that RC[5]=J2, but not sure how
Bookmarks