Hello again Ewa,

Not sure if this will help but it might get you started.

Set up your database in a spreadsheet in the following way. generate the sibcount using the following formula -

=SUMPRODUCT(($B$2:$B$17=B2)*($C$2:$C$17=C2)) in D2 and copy it down.

Now select the data range and Data, Sort, Sort by sibcount, family name and group.

Set up a table of your break start and finish times. Such as:

in I2:J5

In E2 enter the following formula:

=IF(D2>1,TIME(0,20,0),TIME(0,15,0)) and copy down (format the cells as Time).

In F2 enter the following formula:

=D2*E2

In F3 enter the following formula

=IF(AND(B3=B2,C3=C2),F2-E3,D3*E3) and copy down

In G1 enter your Work start time (before your first interview say 8:20.

In G2 enter the following formula:

=IF(G1+F2<$J$4,IF(G1+F2<$J$2,G1+E2,IF(G1<$J$2,$J$3,G1+E2)),IF(G1<$J$4,$J$5,G1+E2)) and copy down.

Now, I know this will leave gaps in the schedule from time to time and will need to be broken up in some way to spread over a considerable number of days to schedule the appointments that you need but perhaps it will get you started.

I do hope I have gone close to understanding what you want and that this helps in some way.

Regards

Harry