Sorry, I was puzzled by the ":BN$1" in =COUNTIF($E$2:$E$49;M$1
:BN$1). You can remove that part unless you want to use an array formula. In linear context Calc ignores it anyway.
So M2 counts how many times there is M1 (value 1) in E2:E49. First column E only means, you are interested in the first drawn number in all drawings. I can imagine that you are after functions like SMALL, LARGE and FREQUENCY.
I have read a book on formulas for Microsoft Excell that uses a generic type of example
And the example is ...?