Thanks.. it is working as expected.. but your formula in post #6 contains comma(,) in place of pipe(|).. thats why it didnt work for me!! Thanks again