IF/Subproduct Formula

Rob #4

Board Regular
Joined
Jun 19, 2003
Messages
194
Can someone help me fix this Formula:

=IF('Resident Worker Hour Report'!K19:DJ400>1),(SUMPRODUCT(--('Resident Worker Hour Report'!$B$19:$B$400="Company"),--('Resident Worker Hour Report'!$A$19:$A$400="Class"))

My Rows I have Workers Names, Company Name and Work Class. My Columns K thru DJ are calender weeks where I track the hours someone works each week. I want to count the number of people who work more then 1 hour for each Month. So Columns K thru N are January, O thru R are February, and so on.

Any ideas?
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Do you have some sort of header row which gives start date of each week or similar. How do you calssify weeks which start in one month and end in another?
 
Upvote 0
I am getting closer to solving this. I have come up with this formula, but I have a feeling it can be simplified:

=SUMPRODUCT(--('Resident Worker Hour Report'!$B$19:$B$400="Independence Excavating"),--('Resident Worker Hour Report'!$A$19:$A$400="L"),--('Resident Worker Hour Report'!$K$19:$K$400>1))+SUMPRODUCT(--('Resident Worker Hour Report'!$B$19:$B$400="Independence Excavating"),--('Resident Worker Hour Report'!$A$19:$A$400="L"),--('Resident Worker Hour Report'!$L$19:$L$400>1))+SUMPRODUCT(--('Resident Worker Hour Report'!$B$19:$B$400="Independence Excavating"),--('Resident Worker Hour Report'!$A$19:$A$400="L"),--('Resident Worker Hour Report'!$M$19:$M$400>1))+SUMPRODUCT(--('Resident Worker Hour Report'!$B$19:$B$400="Independence Excavating"),--('Resident Worker Hour Report'!$A$19:$A$400="L"),--('Resident Worker Hour Report'!$N$19:$N$400>1))

Basically I have had to count each week seperatly and then add them together. The problem with this is, I get people counted multiple times. If someone works all 4 weeks, then they get counted 4 times. How can I modify this formula, to not count someone more then once? There as to be an easier way, since using this formula, I will have to modify the columns for each month. Any help would be appreciated. Thank you
 
Upvote 0
Try this Array Formula,

=SUM(IF('Resident Worker Hour Report'!$B$19:$B$400="Independence Excavating",IF('Resident Worker Hour Report'!$A$19:$A$400="L",IF('Resident Worker Hour Report'!$K$19:$N$400>1,1))))

Confirmed with Control+Shift+Enter, not just Enter.
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,827
Members
452,946
Latest member
JoseDavid

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