This might help - please see the attachment.
I'm not sure that this approach has any statistical validity but good luck anyway!
This might help - please see the attachment.
I'm not sure that this approach has any statistical validity but good luck anyway!
Martin
Ok, maybe I didn't explain it properly. Part of your example is ok, and part is not. Let's look at your example, for number 2. It shows up after 15 withdrawings, that is ok. Then after 4 withdrawings (if we watch it relative to the previous withdrawing, not to the beginning). It should continue in the same fashion (that's the part I did not explained well), so always relative to the previous withdrawing. Number 2 then shows up after 4, and after that after 1 withdrawing. Correct line should be: 15-4-4-1. I'm sorry to bother you so much, otherwise this book is exactly what I wanted.
My mistake - please use the substitute cope below on the module1 sheet in the VBA editor. I'd forgotten to reset the start point when the second or subsequent occurence was found.
![]()
Sub Update() Columns(11).ClearContents For N = 1 To 49 Counter = 0 LastTime = 0 For M = 2 To Cells(65536, 2).End(xlUp).Row If Application.CountIf(Range(Cells(M, 2), Cells(M, 7)), N) > 0 Then If Cells(N, 11) = "" Then Cells(N, 11) = M - 1 Else Cells(N, 11) = Cells(N, 11) & "-" & M - 1 - LastTime End If LastTime = M - 1 End If Next M Next N End Sub
Now it's perfect! Thanks!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks