payout calculation -please help

Hello everyone. I really could use some help figuring out a payout calculation for a weekly split of funds based on nightly participation.

Here's my problem, I have to split a set amount of funds each week between a random # of people. I want to award diff amounts based on 3, 4 and 5 nights of participation. Every week is different for the total amount of people.

**example:** week earned let's say 300$ and 28 people total

15 people at 5 nights earn the most

10 people at 4 nights earning less than 5 nights

3 people at 3 nights earning less than 4 nights

I want a simple formula I can enter into Excel for ease of use

Thank you very much in advance