Array based formula help

Magoosball

Board Regular
Joined
Jun 4, 2017
Messages
70
Office Version
  1. 365
Below is a sample of my data

Table 1:
From DateTo DateYes or blank
Employee 1
11/26/200112/8/2001Yes
1/7/20021/22/2002Yes
6/17/20027/15/2002
10/5/19951/1/2000Yes
Employee 2
10/21/200412/18/2004Yes
2/25/20053/4/2005
3/6/20053/26/2005Yes
1/8/20062/4/2006
2/23/20062/25/2006Yes
5/31/20066/5/2006

<tbody>
</tbody>


From the above data I need to write 3 formulas to get the answer table below:

Table 2:
Employee NumberMin "Yes" DateMax "Yes" DateNumber of "Non blanks"
Employee 110/05/19951/7/20023
Employee 210/21/20042/23/20063

<tbody>
</tbody>

Please note the formulas need to first find the employee number on table 2 in table 1 and the array of employment dates that match the employee number number.

The formula is looking to find the min and max from date for each employee that ins't blank in the 4th column. It is also looking to count the number of Non blank cells in column 4 for each employee



Thank you in advance!
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Hi Magoos,

Maybe you could use these, note I had to use a helper column but that can be hidden if needed;


Book1
ABCDE
1From DateTo DateYes or blankHelper
2Employee 1Employee 1
326/11/20018/12/2001YesEmployee 1
47/01/200222/01/2002YesEmployee 1
517/06/200215/07/2002Employee 1
65/10/19951/01/2000YesEmployee 1
7Employee 2Employee 2
821/10/200418/12/2004YesEmployee 2
925/02/20054/03/2005Employee 2
106/03/200526/03/2005YesEmployee 2
118/01/20064/02/2006Employee 2
1223/02/200625/02/2006YesEmployee 2
1331/05/20065/06/2006Employee 2
14
15
16Employee NumberMin "Yes" DateMax "Yes" DateNumber of "Non blanks"
17Employee 15/10/19957/01/20023
18Employee 221/10/200423/02/20063
Sheet1
Cell Formulas
RangeFormula
E2=IF(A2="",E1,A2)
D17=COUNTIFS($E$2:$E$13,A17,$D$2:$D$13,"?*")
A17{=IFERROR(INDEX($A$2:$A$13,SMALL(IF($A$2:$A$13>0,ROW($A$2:$A$13)-ROW($A$2)+1),ROWS($A$17:A17))),"")}
B17{=MIN(IF($D$2:$D$13&$E$2:$E$13="Yes"&$A17,$B$2:$B$13))}
C17{=MAX(IF($D$2:$D$13&$E$2:$E$13="Yes"&$A17,$B$2:$B$13))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Solution

Book1
ABCDEFGH
1From DateTo DateYes or blankEmployee NumberMin "Yes" DateMax "Yes" DateNumber of "Non blanks"
2Employee 111/26/200112/8/2001YesEmployee 110/5/19951/7/20023
3Employee 11/7/20021/22/2002YesEmployee 210/21/20042/23/20063
4Employee 16/17/20027/15/2002
5Employee 110/5/19951/1/2000Yes
6Employee 210/21/200412/18/2004Yes
7Employee 22/25/20053/4/2005
8Employee 23/6/20053/26/2005Yes
9Employee 21/8/20062/4/2006
10Employee 22/23/20062/25/2006Yes
11Employee 25/31/20066/5/2006
Sheet1


Note the modification to the data.

In F2 control+shift+enter, not just enter, and copy down:

=MIN(IF($A$2:$A$11=E2,IF($D$2:$D$11="yes",$B$2:$B$11)))

In G2 control+shift+enter, not just enter, and copy down:

=MAX(IF($A$2:$A$11=E2,IF($D$2:$D$11="yes",$B$2:$B$11)))

In H2 just enter and copy down:

=COUNTIFS($A$2:$A$11,E2,$D$2:$D$11,"?*")
 
Upvote 0

Forum statistics

Threads
1,215,613
Messages
6,125,836
Members
449,266
Latest member
davinroach

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