Well you can do it just for one particular kind of unit. Just press, I think shift and 'u', instead of regular 'u' amd all you pikeman could magically become musketman - at a price of course. If you mean all pikeman, all spearman, etc. then no, but how many different kinds of units could you do at one anyway. It costs the same gold to upgrade through each middle unit as it does to upgrade from lowest to highest (unless you get leo's in the process) so upgrade all when you have the gold.