I require help with a formula to determine average wait time for recurrence of a number in a range
I have a range
A1=1
A2=2
A3=2
A4=1
A5=1
A6=3
A7=3
A8=4
A9=4
A10=1
A11=1
A12=2
A13=1
A14=3
A15=1
A16=2
A17=1
A18=4
A19=3
A20=1
If I was to enter "1" in cell D1
I wish a formula in E1 to reflect 2.375
this being
3 (A4 to A1)
1 (A5 to A4)
5 (A10 to A5)
1 (A11 to A10)
2 (A13 to A11)
2 (A15 to A13)
2 (A17 to A15)
3 (A20 to A17)
2.375
I have a range
A1=1
A2=2
A3=2
A4=1
A5=1
A6=3
A7=3
A8=4
A9=4
A10=1
A11=1
A12=2
A13=1
A14=3
A15=1
A16=2
A17=1
A18=4
A19=3
A20=1
If I was to enter "1" in cell D1
I wish a formula in E1 to reflect 2.375
this being
3 (A4 to A1)
1 (A5 to A4)
5 (A10 to A5)
1 (A11 to A10)
2 (A13 to A11)
2 (A15 to A13)
2 (A17 to A15)
3 (A20 to A17)
2.375