SUMPRODUCT Vertical & Horizontal

gomukuma

New Member
Joined
Jan 7, 2014
Messages
48
Hi There.

I need to add a further stipulation to a formula im using, but it doesn't quite seem to be as simple as i thought and wonder if anyone could help.

DATA (Unsocials)
[TABLE="class: grid, width: 600, align: left"]
<TBODY>[TR]
[TD]MACH[/TD]
[TD]SHIFT[/TD]
[TD]Sun 30 Apr[/TD]
[TD]Mon 1 May[/TD]
[TD]Tue 2 May[/TD]
[TD]Wed 3 May[/TD]
[TD]Thurs 4 May[/TD]
[TD]Fri 5 May[/TD]
[TD]Sat 6 May[/TD]
[TD]Sun 7 May[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Month1[/TD]
[TD]Month2[/TD]
[TD]Month2[/TD]
[TD]Month2[/TD]
[TD]Month2[/TD]
[TD]Month1[/TD]
[TD]Month2[/TD]
[TD]Month2[/TD]
[/TR]
[TR]
[TD]X[/TD]
[TD]AM[/TD]
[TD]Paul[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Paul[/TD]
[TD]Zoe[/TD]
[/TR]
[TR]
[TD]X[/TD]
[TD]PM[/TD]
[TD]Shane[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Sarah[/TD]
[TD]Shane[/TD]
[/TR]
[TR]
[TD]Z[/TD]
[TD]AM[/TD]
[TD]Sarah[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Phil[/TD]
[TD]Jenny[/TD]
[/TR]
[TR]
[TD]Z[/TD]
[TD]PM[/TD]
[TD]Jenny[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Peter[/TD]
[TD]Paul[/TD]
[/TR]
</TBODY>[/TABLE]











There is a column for every day of the year


Summary (Table14)
[TABLE="class: grid, width: 600, align: left"]
<TBODY>[TR]
[TD]Initials[/TD]
[TD]Sat Unsocial (PM)[/TD]
[TD]Sun Unsocial (AM)[/TD]
[/TR]
[TR]
[TD]Sarah[/TD]
[TD]1 (formula)[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Jenny[/TD]
[TD]0[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Paul[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Phil[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Peter[/TD]
[TD]1[/TD]
[TD][/TD]
[/TR]
</TBODY>[/TABLE]










So int this part of the Summary, i am calculating how many SAT PM / SUM AM Shifts have been worked for each employee. I can't change the data around because its linked to a roster.

This is the formula im using at the moment which will count the number of Saturdays/Sundays.
=SUMPRODUCT((Unsocials!$C$1:$NC$1="Saturday")*(Roster!$C$72:$NC$72=Table14[[#Headers],[Month 1]])*(Unsocials!$C$4:$NC$39=[@Initials]))

I need to add to this so it will only count the Saturdays is a PM in column B on the DATA Sheet.

This is the final peice of my puzzle, any help would be grately appreciated!

Thank you! :)
 

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