Count based on criteria

Wanted to count values based on certain criteria.   For example per the attachment.

The count is on the "MAT_REC_BY_MONTH" tab and the data is on the "DATA" Tab.  I've added some values on Week 1 and week 2 to show what the values should be.

On "MAT_REC_BY_MONTH" tab:  Column D (REC), the count is based on the "DATA" Tab Column Z filtered on "blanks" on Column AB for Calendar WK 1 on column Y.
On "MAT_REC_BY_MONTH" tab:  Column E (REJ), the count is based on the "DATA" Tab Column Z filtered on "YES" on Column AB for Calendar WK 1 on column Y.

Wanted a formula to count for all the weeks listed on the "MAT_REC_BY_MONTH" tab.  See attachment.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
Please try this...

In D3

Open in new window

In E3

Open in new window

And then copy both the formulas down the rows.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ShumsExcel & VBA ExpertCommented:
Hi Luis,

Please find attached....actually you needed the sum not the count :)

Oops forgot to attach...:)
LUIS FREUNDAuthor Commented:
Awesome!   Thank  you both for the solution!   Happy New Year to both!
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
You're welcome Luis!
Thanks and same to you too. :)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Office

From novice to tech pro — start learning today.