Catalyzes two distinct but analogous reactions: the reversible epimerization of UDP-glucose to UDP-galactose and the reversible epimerization of UDP-N-acetylglucosamine to UDP-N-acetylgalactosamine. The reaction with UDP-Gal plays a critical role in the Leloir pathway of galactose catabolism in which galactose is converted to the glycolytic intermediate glucose 6-phosphate. It contributes to the catabolism of dietary galactose and enables the endogenous biosynthesis of both UDP-Gal and UDP-GalNAc when exogenous sources are limited. Both UDP-sugar interconversions are important in the synthesis of glycoproteins and glycolipids. UDP-alpha-D-glucose = UDP-alpha-D-galactose UDP-N-acetyl-alpha-D-glucosamine = UDP-N-acetyl-alpha-D-galactosamine Optimum pH is 7.9. Carbohydrate metabolism; galactose metabolism. Homodimer. Expressed in prestalk cells, between 16 and 21 hours. Expression peaks at 18.5 hours. After the expression has peaked the enzyme is released to the surrounding media. Belongs to the NAD(P)-dependent epimerase/dehydratase family.