thanks, it works. but my requirement is to use a IF function. can a solution be available on that??