Sumproduct with Indirect Sheet Names

mdonovan890

New Member
Joined
Dec 22, 2016
Messages
24
I am working within Excel 2016 and I am currently using the following formula to count the number of dates equal to the week number.
=SUMPRODUCT(--(ISOWEEKNUM(A3)=ISOWEEKNUM('---General Chem---'!$E$2:$E$8000)),--(YEAR(A3)=YEAR('---General Chem---'!$E$2:$E$8000)))

This formula works however, I would like to adapt it so that my sheet names can be listed in a cell instead of hard coded.

What I have so far:
Sheet Name listed in G1
=SUMPRODUCT(--(ISOWEEKNUM(A3)=ISOWEEKNUM(INDIRECT(""&G$1&"'! !$E$2:$E$8000")),--(YEAR(A3)=YEAR(""&g$1&"'! !$E$2:$E$8000")))


This formula keeps returning as an error, could anyone tell me what I am doing wrong?
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Try...

Code:
=SUMPRODUCT(--(ISOWEEKNUM(A3)=ISOWEEKNUM(INDIRECT("'"&$G$1&"'!$E$2:$E$8000"))),--(YEAR(A3)=YEAR(INDIRECT("'"&$G$1&"'!$E$2:$E$8000"))))

Hope this helps!
 
Upvote 0

Forum statistics

Threads
1,216,175
Messages
6,129,299
Members
449,499
Latest member
HockeyBoi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top