# Planning activities on difrent daye - but two only

#### tenbellies

##### New Member
Hi all,

I have a large spreadsheet with a seris of activites on the majority can be done the same day, however further down the process we can only do two each day.

So is there a formula that anyone knows that looks at a row of dates and then only allocates two activities on any one weekday, so it would look like this?

 01/10/18 02/10/18 01/10/18 02/10/18 01/10/18 03/10/18 01/10/18 03/10/18 02/10/18 04/10/18 02/10/18 04/10/18 03/10/18 05/10/18 04/10/18 05/10/18 04/10/18 08/10/18 04/10/18 08/10/18

<tbody>
</tbody>

### Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

#### Oscar Cronquist

##### Board Regular
A
B
C
D
1
Dates1Dates2Dates 2
2
1/10/2018​
2/10/2018​
8/10/2018​
3
1/10/2018​
2/10/2018​
8/10/2018​
4
1/10/2018​
3/10/2018​
5/10/2018​
5
1/10/2018​
3/10/2018​
2/10/2018​
6
2/10/2018​
4/10/2018​
2/10/2018​
7
2/10/2018​
4/10/2018​
4/10/2018​
8
3/10/2018​
5/10/2018​
3/10/2018​
9
4/10/2018​
5/10/2018​
4/10/2018​
10
4/10/2018​
8/10/2018​
3/10/2018​
11
4/10/2018​
8/10/2018​
5/10/2018​
 Sheet: Sheet63

Array formula in cell B2:

=MIN(IF((COUNTIF(\$B\$1:B1,\$D\$2:\$D\$11)<2)*(COUNTIF(\$D\$2:\$D\$11,\$D\$2:\$D\$11)>COUNTIF(\$B\$1:B1,\$D\$2:\$D\$11)),\$D\$2:\$D\$11,""))

Press and hold CTRL + SHIFT and then press Enter to create an array formula.

Replies
17
Views
109
Replies
7
Views
47
Replies
3
Views
348
Replies
3
Views
384
Replies
5
Views
58