Hi everyone,
I have the following table
[TABLE="width: 425"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD="align: center"]Office[/TD]
[TD="align: center"]Position[/TD]
[TD="align: center"]Start Date[/TD]
[TD="align: center"]Termination Date[/TD]
[/TR]
[TR]
[TD="align: center"]New York[/TD]
[TD="align: center"]Manger[/TD]
[TD="align: center"]20-Jan-16[/TD]
[TD="align: center"]11-Nov-17[/TD]
[/TR]
[TR]
[TD="align: center"]Chicago[/TD]
[TD="align: center"]Director[/TD]
[TD="align: center"]20-Jan-16[/TD]
[TD="align: center"]28-Dec-18[/TD]
[/TR]
[TR]
[TD="align: center"]Miami[/TD]
[TD="align: center"]Senior Manager[/TD]
[TD="align: center"]20-Jan-16[/TD]
[TD="align: center"]13-Feb-17[/TD]
[/TR]
[TR]
[TD="align: center"]Boston[/TD]
[TD="align: center"]Director[/TD]
[TD="align: center"]20-Jan-16[/TD]
[TD="align: center"]2-Apr-17[/TD]
[/TR]
[TR]
[TD="align: center"]Toronto[/TD]
[TD="align: center"]Manger[/TD]
[TD="align: center"]20-Jan-16[/TD]
[TD="align: center"]20-May-19[/TD]
[/TR]
[TR]
[TD="align: center"]Seattle[/TD]
[TD="align: center"]Senior Manager[/TD]
[TD="align: center"]20-Jan-16[/TD]
[TD="align: center"]8-Jul-17[/TD]
[/TR]
[TR]
[TD="align: center"]Paris[/TD]
[TD="align: center"]Director[/TD]
[TD="align: center"]20-Jan-16[/TD]
[TD="align: center"]26-Aug-19[/TD]
[/TR]
[TR]
[TD="align: center"]London[/TD]
[TD="align: center"]Manager[/TD]
[TD="align: center"]20-Jan-16[/TD]
[TD="align: center"]15-Oct-17[/TD]
[/TR]
[TR]
[TD="align: center"]Berlin[/TD]
[TD="align: center"]Senior Manager[/TD]
[TD="align: center"]20-Jan-16[/TD]
[TD="align: center"]30-Sep-19[/TD]
[/TR]
[TR]
[TD="align: center"]Moscow[/TD]
[TD="align: center"]Director[/TD]
[TD="align: center"]18-Jan-16[/TD]
[TD="align: center"]10-Sep-17[/TD]
[/TR]
[TR]
[TD="align: center"]Tokio[/TD]
[TD="align: center"]Director[/TD]
[TD="align: center"]18-Jan-16[/TD]
[TD="align: center"]11-Aug-19[/TD]
[/TR]
[TR]
[TD="align: center"]Rome[/TD]
[TD="align: center"]Manager[/TD]
[TD="align: center"]18-Jan-16[/TD]
[TD="align: center"]14-May-17[/TD]
[/TR]
[TR]
[TD="align: center"]New York[/TD]
[TD="align: center"]Senior Manager[/TD]
[TD="align: center"]18-Jan-16[/TD]
[TD="align: center"]6-Jul-19[/TD]
[/TR]
[TR]
[TD="align: center"]Chicago[/TD]
[TD="align: center"]Senior Manager[/TD]
[TD="align: center"]18-Jan-16[/TD]
[TD="align: center"]28-Aug-17[/TD]
[/TR]
[TR]
[TD="align: center"]New York[/TD]
[TD="align: center"]Senior Manager[/TD]
[TD="align: center"]18-Jan-16[/TD]
[TD="align: center"]21-Oct-19[/TD]
[/TR]
[TR]
[TD="align: center"]Boston[/TD]
[TD="align: center"]Manager[/TD]
[TD="align: center"]18-Jan-16[/TD]
[TD="align: center"]14-Dec-17[/TD]
[/TR]
[TR]
[TD="align: center"]Toronto[/TD]
[TD="align: center"]Director[/TD]
[TD="align: center"]18-Jan-16[/TD]
[TD="align: center"]7-Feb-27[/TD]
[/TR]
[TR]
[TD="align: center"]Berlin[/TD]
[TD="align: center"]Director[/TD]
[TD="align: center"]18-Jan-16[/TD]
[TD="align: center"]3-Apr-20[/TD]
[/TR]
[TR]
[TD="align: center"]Berlin[/TD]
[TD="align: center"]Manager[/TD]
[TD="align: center"]18-Jan-16[/TD]
[TD="align: center"]29-May-17[/TD]
[/TR]
[TR]
[TD="align: center"]Chicago[/TD]
[TD="align: center"]Director[/TD]
[TD="align: center"]18-Jan-16[/TD]
[TD="align: center"]25-Jul-17[/TD]
[/TR]
</tbody>[/TABLE]
I urgently need to find average number of days all employees worked in the company by office and position using one formula and fill in the following table:
[TABLE="width: 396"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD="align: center"]Office[/TD]
[TD="align: center"]Manager[/TD]
[TD="align: center"]Senior Manager[/TD]
[TD="align: center"]Director[/TD]
[/TR]
[TR]
[TD="align: center"]New York[/TD]
[TD="align: center"] [/TD]
[TD="align: center"] [/TD]
[TD="align: center"] [/TD]
[/TR]
[TR]
[TD="align: center"]Boston[/TD]
[TD="align: center"] [/TD]
[TD="align: center"] [/TD]
[TD="align: center"] [/TD]
[/TR]
[TR]
[TD="align: center"]Berlin[/TD]
[TD="align: center"] [/TD]
[TD="align: center"] [/TD]
[TD="align: center"] [/TD]
[/TR]
[TR]
[TD="align: center"]Chicago
...[/TD]
[TD="align: center"] [/TD]
[TD="align: center"] [/TD]
[TD="align: center"] [/TD]
[/TR]
</tbody>[/TABLE]
I think that AVERAGEIFS should be used but have no idea how to do this. Also some termination dates are later than today and this adds some complexity.
Please, help. Thanks a lot in advance.
I have the following table
[TABLE="width: 425"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD="align: center"]Office[/TD]
[TD="align: center"]Position[/TD]
[TD="align: center"]Start Date[/TD]
[TD="align: center"]Termination Date[/TD]
[/TR]
[TR]
[TD="align: center"]New York[/TD]
[TD="align: center"]Manger[/TD]
[TD="align: center"]20-Jan-16[/TD]
[TD="align: center"]11-Nov-17[/TD]
[/TR]
[TR]
[TD="align: center"]Chicago[/TD]
[TD="align: center"]Director[/TD]
[TD="align: center"]20-Jan-16[/TD]
[TD="align: center"]28-Dec-18[/TD]
[/TR]
[TR]
[TD="align: center"]Miami[/TD]
[TD="align: center"]Senior Manager[/TD]
[TD="align: center"]20-Jan-16[/TD]
[TD="align: center"]13-Feb-17[/TD]
[/TR]
[TR]
[TD="align: center"]Boston[/TD]
[TD="align: center"]Director[/TD]
[TD="align: center"]20-Jan-16[/TD]
[TD="align: center"]2-Apr-17[/TD]
[/TR]
[TR]
[TD="align: center"]Toronto[/TD]
[TD="align: center"]Manger[/TD]
[TD="align: center"]20-Jan-16[/TD]
[TD="align: center"]20-May-19[/TD]
[/TR]
[TR]
[TD="align: center"]Seattle[/TD]
[TD="align: center"]Senior Manager[/TD]
[TD="align: center"]20-Jan-16[/TD]
[TD="align: center"]8-Jul-17[/TD]
[/TR]
[TR]
[TD="align: center"]Paris[/TD]
[TD="align: center"]Director[/TD]
[TD="align: center"]20-Jan-16[/TD]
[TD="align: center"]26-Aug-19[/TD]
[/TR]
[TR]
[TD="align: center"]London[/TD]
[TD="align: center"]Manager[/TD]
[TD="align: center"]20-Jan-16[/TD]
[TD="align: center"]15-Oct-17[/TD]
[/TR]
[TR]
[TD="align: center"]Berlin[/TD]
[TD="align: center"]Senior Manager[/TD]
[TD="align: center"]20-Jan-16[/TD]
[TD="align: center"]30-Sep-19[/TD]
[/TR]
[TR]
[TD="align: center"]Moscow[/TD]
[TD="align: center"]Director[/TD]
[TD="align: center"]18-Jan-16[/TD]
[TD="align: center"]10-Sep-17[/TD]
[/TR]
[TR]
[TD="align: center"]Tokio[/TD]
[TD="align: center"]Director[/TD]
[TD="align: center"]18-Jan-16[/TD]
[TD="align: center"]11-Aug-19[/TD]
[/TR]
[TR]
[TD="align: center"]Rome[/TD]
[TD="align: center"]Manager[/TD]
[TD="align: center"]18-Jan-16[/TD]
[TD="align: center"]14-May-17[/TD]
[/TR]
[TR]
[TD="align: center"]New York[/TD]
[TD="align: center"]Senior Manager[/TD]
[TD="align: center"]18-Jan-16[/TD]
[TD="align: center"]6-Jul-19[/TD]
[/TR]
[TR]
[TD="align: center"]Chicago[/TD]
[TD="align: center"]Senior Manager[/TD]
[TD="align: center"]18-Jan-16[/TD]
[TD="align: center"]28-Aug-17[/TD]
[/TR]
[TR]
[TD="align: center"]New York[/TD]
[TD="align: center"]Senior Manager[/TD]
[TD="align: center"]18-Jan-16[/TD]
[TD="align: center"]21-Oct-19[/TD]
[/TR]
[TR]
[TD="align: center"]Boston[/TD]
[TD="align: center"]Manager[/TD]
[TD="align: center"]18-Jan-16[/TD]
[TD="align: center"]14-Dec-17[/TD]
[/TR]
[TR]
[TD="align: center"]Toronto[/TD]
[TD="align: center"]Director[/TD]
[TD="align: center"]18-Jan-16[/TD]
[TD="align: center"]7-Feb-27[/TD]
[/TR]
[TR]
[TD="align: center"]Berlin[/TD]
[TD="align: center"]Director[/TD]
[TD="align: center"]18-Jan-16[/TD]
[TD="align: center"]3-Apr-20[/TD]
[/TR]
[TR]
[TD="align: center"]Berlin[/TD]
[TD="align: center"]Manager[/TD]
[TD="align: center"]18-Jan-16[/TD]
[TD="align: center"]29-May-17[/TD]
[/TR]
[TR]
[TD="align: center"]Chicago[/TD]
[TD="align: center"]Director[/TD]
[TD="align: center"]18-Jan-16[/TD]
[TD="align: center"]25-Jul-17[/TD]
[/TR]
</tbody>[/TABLE]
I urgently need to find average number of days all employees worked in the company by office and position using one formula and fill in the following table:
[TABLE="width: 396"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD="align: center"]Office[/TD]
[TD="align: center"]Manager[/TD]
[TD="align: center"]Senior Manager[/TD]
[TD="align: center"]Director[/TD]
[/TR]
[TR]
[TD="align: center"]New York[/TD]
[TD="align: center"] [/TD]
[TD="align: center"] [/TD]
[TD="align: center"] [/TD]
[/TR]
[TR]
[TD="align: center"]Boston[/TD]
[TD="align: center"] [/TD]
[TD="align: center"] [/TD]
[TD="align: center"] [/TD]
[/TR]
[TR]
[TD="align: center"]Berlin[/TD]
[TD="align: center"] [/TD]
[TD="align: center"] [/TD]
[TD="align: center"] [/TD]
[/TR]
[TR]
[TD="align: center"]Chicago
...[/TD]
[TD="align: center"] [/TD]
[TD="align: center"] [/TD]
[TD="align: center"] [/TD]
[/TR]
</tbody>[/TABLE]
I think that AVERAGEIFS should be used but have no idea how to do this. Also some termination dates are later than today and this adds some complexity.
Please, help. Thanks a lot in advance.