I have a macro that currently places this formula in the cell, but I want to switch the sheet name to Active.Sheet-1. Basically whatever the previous sheet is. Any Ideas on how to go about that?
ActiveCell.FormulaR1C1 = _ "=IFERROR(AVERAGEIF('Batting LHP Data'!R2C1:R999999C1,RC1,'Batting LHP Data'!R2C39:R999999C39),0)"
ActiveCell.FormulaR1C1 = _ "=IFERROR(AVERAGEIF('Batting LHP Data'!R2C1:R999999C1,RC1,'Batting LHP Data'!R2C39:R999999C39),0)"
Last edited: