How to write a rollup summary trigger for a lookup relationship
Is there anyway to update a rollup summary field with lookup relation ship for a custom object. How can we achieve this using triggers ?
Sorry, I've deleted my answer, because I misunderstood the question. Here you have a good article to follow: http://blog.jeffdouglas.com/2009/07/30/roll-up-summary-fields-with-lookup-relationships-part-1/
The above link from Abhinav solves your problem
If you need for more than one object would recommend to try the excellent tool from Andrew
And if you have requirement for only one object ,you can prefer jeff solution as well