Calculate Total Hours With Ctiteria

kumara_faith

Well-known Member
Joined
Aug 19, 2006
Messages
953
Office Version
  1. 365
Hi,

I have the following tables:

Table 1Table 2Table 3
StaffWorkWorkHoursStaffHours
Staff1FDFD450Staff11125
Staff2AL_AMAL_AM225Staff2450
Staff3AL_PMAL_PM225Staff3450
Staff40Staff40
Staff1FD
Staff2AL_AM
Staff3AL_PM
Staff4
Staff1AL_PM
Staff2AL_AM
Staff3AL_PM
Staff4



Table 1 is the data. Table 2 indicates the hours for each work type. In Table 3, I am trying to summarize with a formula on the total hours for staff1, staff2 and staff3. The actual result is in Table 3. Is there a formula that I could use in Table 3 ? Appreciate all the help. Thanks.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Hi,

Updated the table as below:

Table 1Table 2Table 3JanFebMar
JanStaffWorkWorkHoursStaffHoursHoursHours
JanStaff1FDFD450Staff1450225225
JanStaff2AL_AMAL_AM225Staff2225225225
JanStaff3AL_PMAL_PM225Staff3225225225
JanStaff40Staff4000
FebStaff1FD
FebStaff2AL_AM
FebStaff3AL_PM
FebStaff4
MarchStaff1AL_PM
MarchStaff2AL_AM
MarchStaff3AL_PM
MarchStaff4
 
Upvote 0
Try.

Table3's Mar should be replaced by March.

Staff month.xlsx
ABCDEFGHIJK
1MonthStaffWorkWorkHoursStaffJanFebMarch
2JanStaff1FDFD450Staff1450450225
3JanStaff2AL_AMAL_AM225Staff2225225225
4JanStaff3AL_PMAL_PM225Staff3225225225
5JanStaff4Staff4000
6FebStaff1FD
7FebStaff2AL_AM
8FebStaff3AL_PM
9FebStaff4
10MarchStaff1AL_PM
11MarchStaff2AL_AM
12MarchStaff3AL_PM
13MarchStaff4
sheet2
Cell Formulas
RangeFormula
I2:K5I2=IFERROR(INDEX($F$2:$F$4,MATCH(INDEX($C$2:$C$13,MATCH($H2&I$1,$B$2:$B$13&$A$2:$A$13,0)),$E$2:$E$4,0)),0)
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

Forum statistics

Threads
1,224,527
Messages
6,179,345
Members
452,907
Latest member
Roland Deschain

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