sum the average count days based on conditions

Imran Azam

Board Regular
Joined
Mar 15, 2011
Messages
103
Hi All

Hope everyone is well

I have the below data and i am trying to answer the question : what is the overall average length of days for open status for each manager ALi and MAX.

ABCD
1ManagerStart DateEnd Datestatus
2Ali15/02/201917/02/2019Open
3Ali18/02/201919/02/2019Closed
4Ali19/02/201921/02/2019Closed
5Ali19/02/201919/02/2019Open
6Ali18/02/201925/02/2019Open
7Ali20/02/201920/02/2019Open
8Max05/02/201907/02/2019Closed
9Max04/02/201912/02/2019Open
10Max14/02/201914/02/2019Closed
11Max12/02/201920/02/2019Closed

<tbody>
</tbody>

i would like to return something like Ali: 9 days Max: 8 days

I think the date difference between start and end date for each row news to be done first, and then condition the manager name and open status and then do the average sum. This is the logic i want to apply but cant seem to get it into a formula

Can this be done if so how?

thank you for any help provided
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
This should do it,


Book1
ABCDE
1ManagerStart DateEnd DatestatusDays
2Ali15/02/201917/02/2019Open2
3Ali18/02/201919/02/2019Closed1
4Ali19/02/201921/02/2019Closed2
5Ali19/02/201919/02/2019Open0
6Ali18/02/201925/02/2019Open7
7Ali20/02/201920/02/2019Open0
8Max05/02/201907/02/2019Closed2
9Max04/02/201912/02/2019Open8
10Max14/02/201914/02/2019Closed0
11Max12/02/201920/02/2019Closed8
12
13Ali2.25
14Max8
Sheet1
Cell Formulas
RangeFormula
E2=C2-B2
E3=C3-B3
E4=C4-B4
E5=C5-B5
E6=C6-B6
E7=C7-B7
E8=C8-B8
E9=C9-B9
E10=C10-B10
E11=C11-B11
B13=AVERAGEIFS($E$2:$E$11,$A$2:$A$11,A13,$D$2:$D$11,"Open")
B14=AVERAGEIFS($E$2:$E$11,$A$2:$A$11,A14,$D$2:$D$11,"Open")
 
Upvote 0

Forum statistics

Threads
1,214,426
Messages
6,119,417
Members
448,895
Latest member
omarahmed1

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