ok, I sent "Post reply" too soon. I also wanted to mention that the reason I think you might not need any of this is because you can do it directly with FlexCel and no UDF.
You want to add a comment in a cell that doesn't have a comment in the template. But you can think it on reverse: You can add a comment to the template (instead of writing <#CommentUDF()> in the cell). Then send null to the cells where you don't want a comment, and the text to the cells where you want it. FlexCel will automatically delete all null comments, so the end result should be the same.
In your approach, you add comments only to some cells.
In this other approach, you add a comment to "all" the cells, but remove those you don't want by assigning null to them.