Hi all,
I am trying to solve a pattern problem and need your help desperately. Is doing my head in.
So I have a number of clients that have booked an appointment. As you can see in the file the weeks are at the top. What I want to find out for each customer is:
1. count the number of appointment blocks, where an appointment block is sequence of 1 or more appointments one after the other and with no more than 4
weeks off. Say for instance a person will have an appointment in week 5 and 6 then week 9 they have another appointment. The 5, 6, and 9 would count as a block. If the appointment is on week 11 then only 5 and 6 will be counted as a block and appointment in week 11 as another block. I hope it makes sense. I tried using =CEILING(COUNT(B3:DE3,"<>")/5,1)...but the result is wrong. For example C7:U7 can be counted as one block as the gaps don't go longer than four weeks (weeks count is at the top)! 2. Average number of appointments within a block
3. Average time difference between the blocks. Sometimes it might be longer than 4 weeks...it could be 6 months. I need this number in weeks.
All this will be on rolling data of 12 months.
Data looks like this :
Week number at the top
Name of customer on the side
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15......
Jan 1 2 1 1 1 1 1
Ben 1 1 1 1 1
Jony 1 1 1 1 1
Jan 2 appointment blocks
Ben 2 app blocks
Jony 3 app blocks
Average appointment within a block
Jan 2.6
Ben 2
Jony 1.5
etc
I am trying to solve a pattern problem and need your help desperately. Is doing my head in.
So I have a number of clients that have booked an appointment. As you can see in the file the weeks are at the top. What I want to find out for each customer is:
1. count the number of appointment blocks, where an appointment block is sequence of 1 or more appointments one after the other and with no more than 4
weeks off. Say for instance a person will have an appointment in week 5 and 6 then week 9 they have another appointment. The 5, 6, and 9 would count as a block. If the appointment is on week 11 then only 5 and 6 will be counted as a block and appointment in week 11 as another block. I hope it makes sense. I tried using =CEILING(COUNT(B3:DE3,"<>")/5,1)...but the result is wrong. For example C7:U7 can be counted as one block as the gaps don't go longer than four weeks (weeks count is at the top)! 2. Average number of appointments within a block
3. Average time difference between the blocks. Sometimes it might be longer than 4 weeks...it could be 6 months. I need this number in weeks.
All this will be on rolling data of 12 months.
Data looks like this :
Week number at the top
Name of customer on the side
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15......
Jan 1 2 1 1 1 1 1
Ben 1 1 1 1 1
Jony 1 1 1 1 1
Jan 2 appointment blocks
Ben 2 app blocks
Jony 3 app blocks
Average appointment within a block
Jan 2.6
Ben 2
Jony 1.5
etc