I'm trying to do a SUMIFS calculation in VBA. It works fine with worksheet name.
I want it to run by worksheet number. so user can change the worksheet name.
Worksheet name "TOTAL_SALES".
Please Help.
Here is code
I want it to run by worksheet number. so user can change the worksheet name.
Worksheet name "TOTAL_SALES".
Please Help.
Here is code
Code:
Range("K2").Select
ActiveCell.FormulaR1C1 = _
"=SUMIFS('TOTAL_SALES'!R3C17:R22000C17,'TOTAL_SALES'!R3C2:R22000C2,RC[-10],'TOTAL_SALES'!R3C4:R22000C4,RC[-8],'TOTAL_SALES'!R3C5:R22000C5,RC[-7],'TOTAL_SALES'!R3C6:R22000C6,RC[-6],'TOTAL_SALES'!R3C7:R22000C7,RC[-5])"