Thank you for your simple solution. I don't know that function but it did exactly as required.