I need an algorithm

From: macca (macca_at_gippstafe.vic.edu.au)
Date: 11/14/03

Date: Fri, 14 Nov 2003 11:29:28 +1100

I'm trying to decide whether I can write a program for the following

There are a number of activities (say 20) - each with a limit on the number
of participants that can take part (some might take 10 - others 20 etc).

Applicants (maybe 200) are given a voting form with all these available -
and they can nominate preferences in order for a certain number (say 1 to 8)

The program would then have to sort through and produce optimised lists of
activities and participants.

I'm sure this is not a new situation.
Any advice?
Should I try to do it with a Spreadsheet/Database/customised VB program?