Hi, welcome to the forum

there are a number of ways to do this, 1 would include creating a table with the min values for each level, along with their %...
M
N
3
0
1
4
25
0.75
5
50
0.5
6
100
0.25
7
8
49
0.75


Or, you could use a nested IF statement...
=IF(M8>=100,0.25,IF(M8>=50,0.5,IF(M8>=25,0.75,1)))

the table is more flexable and allows for easier editing and adding to