hi again,
i have the return of some stocks and their credit rating. i want to consider only the 30 stocks with the lowest rating. the problem is that many stocks have the same rating and i dont know how to express that in excel. i was thinking the if function. for example:

apple rating=1
ibm rating=2
microsoft rating=2
alibaba rating =3
google rating=3
yahoo rating=4

in this example i want to consider only the three worse stocks. these are apple, ibm, microsoft. i cant for example say if rank<4 because that will give me 5 stocks, not three.

any ideas?