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

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
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,224,820
Messages
6,181,160
Members
453,021
Latest member
Justyna P

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