Function to sort currency tab