I'm trying to create a function in excel gives me data based on a chosen date range
=SUMIF('2018'!D:D,"="&$B$1, '2018'!U:U)
The code above is working well except there is one problem: I have to change the 2018
part every year by hand.
Is there any way to allow that to also be changed by using the contents of another cell?
Something like
=SUMIF('B2'!D:D,"="&$B$1, 'B2'!U:U)
I know that is a string but I've tried a bunch of combinations and can't figure it out.
Any help would be much appreciated.
Thanks!