You're welcome!
I noticed you are new... please, next time when you are posting a question, post CREATE TABLE and INSERT statement for sample data on which to test it, it helps a lot to get the right answer. (Phil Parkin has very useful links in his signature, about how to ask questions... read them!)
Vladan