If you have your project file set up properly, it should do this automatically. It's part of MSProject... Can you be more specific?