usually you want your melee up front blocking the enemy's path to your ranged...this usually consists of an "Attack Move" which is hit 'A' and click towards the enemy....and then you select ranged units weather with subgroup or hotkey and queue up focus fire targets. You hit "A" then hold shift and alt while you click red health units first and then unarmored, light, etc etc...also, in these situations u find out it's better to have your ranged units on different hotkey than melee because if he runs a unit you're focusing on, back to his base, then your ranged will try to follow. Well to stop this you either hit 'H' for hold, or you tell them to move back, or you just give them new targets. And most of the time you don't really want your meat shield to do any of those things, and so just because your range is messed up and you gotta fix it, doesn't mean your meatshield has to suffer. It's a bitch when you have to reassign your focus fire targets, but that's why i usually don't assign them more than 4 or 5 deep, and also that's what micro is all about right!?
Once I got my units all targeted and positioned well enough i'll usually start looking to use hero spells, or items, or examine how my opponent's units are positioned and targeted and see if there's going to be some troubles, and if so do something about it. (examples of troubles would be if my meat shield was aboout to disappear, or if he got a bunch of melee past the shield and they're going down the line killing my spiders)
Also, when attacking with primarily melee (like lots of ghouls or grunts) you generally do an attack+move and then select smaller groups of units (like 1/2 to 1/3) and queue up targets for them...unless of course you're trying to just overwhelm them with melee for the win...like wagonmancer...but then again you arn't suppose to micro that strat.
Also with buildings i put them all on one hotkey (Hotkey 5) and make extensive use of Tab to cycle through and Ctrl+Click to set rally points for individual buildings (can use it with small mixed armies as well as to not mix orders) When you do this with your buildings they will always be in the same tab order (Crypt first, necropolis second, alter third, gyard 4th, etc etc) so i can produce/upgrade just as quick as having each building on it's own hotkey...