Sort on variable values on export