I encountered a question where a person had put an answer in the comments, then the OP had commented again saying that answer worked, and thanks.
Here was the specific question, but I am asking in a general sense.
I commented to remind people to make proper answers instead of leaving the answers in the comments.
BUT:
Would it have been OK for me to copy the correct answer from the comment to a new answer of my own, in order to solve the problem immediately? I wouldn't be doing it to claim credit, but because having a correct answer buried in the comments is not good for people browsing the site.