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

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
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,223,893
Messages
6,175,244
Members
452,622
Latest member
Laura_PinksBTHFT

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