Friends ,
I tried my best , but need help.
Table 1 contains time sheet information . hrs ,project id, manager/resource names(2 levels only)
I have been asked to get total hrs grouped by managers
Managers list : Randy, Srini, Kavin
Table 1
[TABLE="class: cms_table, width: 387"]
<tbody>[TR]
[TD]EMP_HRS[/TD]
[TD]PROJECTID[/TD]
[TD]L1 NAME[/TD]
[TD]L2 NAME[/TD]
[TD]Type[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]ID12345[/TD]
[TD]Jeff[/TD]
[TD]Randy[/TD]
[TD]Functional[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]ID12345[/TD]
[TD]Randy[/TD]
[TD]Jag[/TD]
[TD]Functional[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]ID12345[/TD]
[TD]Randy[/TD]
[TD]Jag[/TD]
[TD]Functional[/TD]
[/TR]
[TR]
[TD]30[/TD]
[TD]ID12345[/TD]
[TD]Srini[/TD]
[TD]Chandra[/TD]
[TD]Functional[/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD]ID12345[/TD]
[TD]Randy[/TD]
[TD]Srini[/TD]
[TD]Functional[/TD]
[/TR]
[TR]
[TD]30[/TD]
[TD]ID12345[/TD]
[TD]Randy[/TD]
[TD]Srini[/TD]
[TD]Functional[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]ID12345[/TD]
[TD]Mike[/TD]
[TD]Kavin[/TD]
[TD]Functional[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]ID12345[/TD]
[TD]Mike[/TD]
[TD]Kavin[/TD]
[TD]Functional[/TD]
[/TR]
[TR]
[TD]25[/TD]
[TD]ID89090[/TD]
[TD]Randy[/TD]
[TD]Jag[/TD]
[TD]Functional[/TD]
[/TR]
[TR]
[TD]30[/TD]
[TD]ID89090[/TD]
[TD]Srini[/TD]
[TD]Chandra[/TD]
[TD]Functional[/TD]
[/TR]
</tbody>[/TABLE]
=IF((COUNTIFS(Table1!$D$2:$D11,$B$1:$D$1,Table1!$B$2:$B$11,$A2,Table1!$D$2:$D$11,B$1))=0,
SUMPRODUCT(--(Table1!$B$2:$B$11=$A2),--(Table1!$E$2:$E$11="Functional"),--(ISNA(MATCH(Table1!$D$2:$D$11,$B$1:$C$1,0))),--(Table1!$C$2:$C$11=B$1),Table1!$A$2:$A$11),SUMPRODUCT((Table1!$B$2:$B$11=$A2)*(Table1!$E$2:$E$11="Functional")*((Table1!$D$2:$D$11=B$1)+(Table1!$C$2:$C$11=B$1)),Table1!$A$2:$A$11))
From the above formula , I get the below values .
Actual (from above formulae)
[TABLE="class: cms_table, width: 269"]
<tbody>[TR]
[TD]ProjectID[/TD]
[TD]Randy[/TD]
[TD]Srini[/TD]
[TD]Kavin[/TD]
[/TR]
[TR]
[TD]ID12345[/TD]
[TD]57[/TD]
[TD]74[/TD]
[TD]4[/TD]
[/TR]
</tbody>[/TABLE]
However, Randy's 57 hrs is not correct because it is adding srini's 44 hrs. I need help how to exclude Srini's hrs from Randy. Expected:
[TABLE="class: cms_table, width: 269"]
<tbody>[TR]
[TD]ProjectID[/TD]
[TD]Randy[/TD]
[TD]Srini[/TD]
[TD]Kavin[/TD]
[/TR]
[TR]
[TD]ID12345[/TD]
[TD]13[/TD]
[TD]74[/TD]
[TD]4[/TD]
[/TR]
</tbody>[/TABLE]
Any help is appreciated.
First of all, Am i moving in right direction with the above formula? or Do we have better approach to solve?
I tried my best , but need help.
Table 1 contains time sheet information . hrs ,project id, manager/resource names(2 levels only)
I have been asked to get total hrs grouped by managers
Managers list : Randy, Srini, Kavin
Table 1
[TABLE="class: cms_table, width: 387"]
<tbody>[TR]
[TD]EMP_HRS[/TD]
[TD]PROJECTID[/TD]
[TD]L1 NAME[/TD]
[TD]L2 NAME[/TD]
[TD]Type[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]ID12345[/TD]
[TD]Jeff[/TD]
[TD]Randy[/TD]
[TD]Functional[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]ID12345[/TD]
[TD]Randy[/TD]
[TD]Jag[/TD]
[TD]Functional[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]ID12345[/TD]
[TD]Randy[/TD]
[TD]Jag[/TD]
[TD]Functional[/TD]
[/TR]
[TR]
[TD]30[/TD]
[TD]ID12345[/TD]
[TD]Srini[/TD]
[TD]Chandra[/TD]
[TD]Functional[/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD]ID12345[/TD]
[TD]Randy[/TD]
[TD]Srini[/TD]
[TD]Functional[/TD]
[/TR]
[TR]
[TD]30[/TD]
[TD]ID12345[/TD]
[TD]Randy[/TD]
[TD]Srini[/TD]
[TD]Functional[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]ID12345[/TD]
[TD]Mike[/TD]
[TD]Kavin[/TD]
[TD]Functional[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]ID12345[/TD]
[TD]Mike[/TD]
[TD]Kavin[/TD]
[TD]Functional[/TD]
[/TR]
[TR]
[TD]25[/TD]
[TD]ID89090[/TD]
[TD]Randy[/TD]
[TD]Jag[/TD]
[TD]Functional[/TD]
[/TR]
[TR]
[TD]30[/TD]
[TD]ID89090[/TD]
[TD]Srini[/TD]
[TD]Chandra[/TD]
[TD]Functional[/TD]
[/TR]
</tbody>[/TABLE]
=IF((COUNTIFS(Table1!$D$2:$D11,$B$1:$D$1,Table1!$B$2:$B$11,$A2,Table1!$D$2:$D$11,B$1))=0,
SUMPRODUCT(--(Table1!$B$2:$B$11=$A2),--(Table1!$E$2:$E$11="Functional"),--(ISNA(MATCH(Table1!$D$2:$D$11,$B$1:$C$1,0))),--(Table1!$C$2:$C$11=B$1),Table1!$A$2:$A$11),SUMPRODUCT((Table1!$B$2:$B$11=$A2)*(Table1!$E$2:$E$11="Functional")*((Table1!$D$2:$D$11=B$1)+(Table1!$C$2:$C$11=B$1)),Table1!$A$2:$A$11))
From the above formula , I get the below values .
Actual (from above formulae)
[TABLE="class: cms_table, width: 269"]
<tbody>[TR]
[TD]ProjectID[/TD]
[TD]Randy[/TD]
[TD]Srini[/TD]
[TD]Kavin[/TD]
[/TR]
[TR]
[TD]ID12345[/TD]
[TD]57[/TD]
[TD]74[/TD]
[TD]4[/TD]
[/TR]
</tbody>[/TABLE]
However, Randy's 57 hrs is not correct because it is adding srini's 44 hrs. I need help how to exclude Srini's hrs from Randy. Expected:
[TABLE="class: cms_table, width: 269"]
<tbody>[TR]
[TD]ProjectID[/TD]
[TD]Randy[/TD]
[TD]Srini[/TD]
[TD]Kavin[/TD]
[/TR]
[TR]
[TD]ID12345[/TD]
[TD]13[/TD]
[TD]74[/TD]
[TD]4[/TD]
[/TR]
</tbody>[/TABLE]
Any help is appreciated.
First of all, Am i moving in right direction with the above formula? or Do we have better approach to solve?