Please have a look at the CrossTab article referenced in my signature.
Based on that you should continue by reading the DynamicCrossTab article also referenced in my sig.
If you need a coded example please provide ready to use sample data as described in the first link.
Lutz
A pessimist is an optimist with experience. How to get fast answers to your question[/url]
How to post performance related questions[/url]
Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]