Thanks for your help,

I tried the above formula but it didn't work.