I have a excel sheet with the order of my course. Every course has it's own colour and place. I have manually made an example of the end result:
\1
The legend is on the right.
I want the cells on the left side to take the right colour and place, depending on the course I type in.

So I enter this:
\1
and I get this:
http://imgur.com/gweKn1t

The course colours and places can change, so it has to be dynamical.
Does anyone has any idea haw to do this?