How to write shorter formula for the following average calculation?

Dezom

New Member
Joined
Jul 21, 2020
Messages
21
Office Version
  1. 2016
Platform
  1. Windows
  2. Mobile
Hello Everyone,
In the following table, What I want is to get the values of "Average of the Duration for Second work and New Work concepts in each week for John". For that I have used two times SUMIFS because of the two different concepts of work and I have used one time SUMPRODUCT formula. How would we write that with shorter? Thank you



Countifs question.xlsx
ABCDEFGHIJKLM
1WorkerWeekConceptDurationAverage Duration
2John1.weekCorrection20Average of the Duration for Second work and New Work concepts in each week for John
3John1.weekSecond work20
4John1.weekNew Work201.week17,333333
5Karhan2.weekMK202.week#SAYI/0!
6John1.weekNew Work123.week#SAYI/0!
7Kylee2.weekSK124.week#SAYI/0!
8Tomas6.weekSK205.week#SAYI/0!
9John2.weekSK126.week15
10Mattheus3.weekSK127.week#SAYI/0!
11Dennis3.weekSK12
12Markus3.weekSK20
13Tomas4.weekNew Work14
14Karhan4.weekNew Work2
15Mattheus4.weekNew Work4
16Karhan4.weekNew Work2
17Karhan5.weekCorrection14
18John5.weekCorrection5
19Kylee5.weekCorrection3
20Kylee5.weekCorrection6
21Kylee5.weekNew Work2
22Jonnathan5.weekNew Work0
23Daniel5.weekSecond work22
24Solomon6.weekProduction Sequence3
25John6.weekSecond work15
26Mattheus6.weekNew Work18
27Kylee7.weekNew Work10
28Dennis7.weekSecond work14
29Solomon7.weekNew Work14
30Jonnathan7.weekNew Work14
Data
Cell Formulas
RangeFormula
H4:H10H4=(SUMIFS($D$2:$D$30,$C$2:$C$30,"Second work",$B$2:$B$30,G4,$A$2:$A$30,"John")+ SUMIFS($D$2:$D$30,$C$2:$C$30,"New Work",$B$2:$B$30,G4,$A$2:$A$30,"John")) /SUMPRODUCT(($B$2:$B$30=G4)*($C$2:$C$30={"Second work","New Work"})*($A$2:$A$30="John"))
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Referrring to post #7( I don't know how to use the " quote" feature), the European separator for arrays is the backslash , not the slash

{"Second work"\"New Work"}
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,180
Members
453,021
Latest member
Justyna P

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