Kamakshi, I won't speak for anyone else here, but if it's left up to me the only kind of help you'll get is the kind that helps you think about this until you understand it and can solve it yourself. So far as I can tell from your last two posts, you're not thinking; you're just half-reading and not trying very hard to understand.
Others may disagree with me and just give you a formula. But I think you should read what Pecoflyer and I have written, and ask questions about it, and/or explain a) what you understand about it and b) what you don't understand.
Actually you don't have to read both our posts. Peco's right, you don't need a VBA program to do this. I just answered in terms of VBA because that's how you phrased the question; but you can do it with worksheet functions instead.
|