Welcome to the forum, and thanks for your post.
I have reformatted the title of your post as a question in accordance with our guidelines:
Please feel free to adapt as you see fit. I also have added the line-numbering tag.
Would you care sharing your code please so we have something to work from? And perhaps a screenshot of the intended results as it is not clear (to me at least) what the intended result is.
You should then get help in no time.