Good day everybody,
Even though I've tried many different syntax, I don't get to work the following code:
I define Year and Year1 as variables, where year is 2017 and Year1 is 17
Then, there's a part of the code where I need to use a SUMIFS to other workbook already open, the original formula is:
=SUMIFS('[Comisiones 2017.xlsm]Stats17'!$F$3:$F$10000,'[Comisiones 2017.xlsm]Stats17'!$E$3:$E$10000,C2,'[Comisiones 2017.xlsm]Stats17'!$B$3:$B$10000,G2)
So, the only thing I want to do is that "2017" and "17" can be defined into the formula with both variables, since the names of the files and sheets will be changing depending on the current year.
I had this problem before and I solved it by inserting, litterally something like: "SUMIFS('[Comisiones "&Sheets("MXN").Range("C3")&"..." as if it took the variable directly from the workbook, however, this solution only works for me when the formula and the referenced cell are on the same workbook, and now, the reference workbook is different from the workbook I want to set the formula in.
Thank you in advance for any help you can provide to me,