Prova ad utilizzare le tabelle PIVOT c'è un wizard in excel piuttosto semplice da usare