Hello nikko50,

Forum Rule #8:
Don't cross-post without a link. Cross-posting is when you post the same question in other forums on the web. You'll find people are disinclined to respond to cross-posts because they may be wasting their time solving a problem that has been solved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post. Expect cross-posts without a link to be closed.

Thank Shg for posting the link for you. Please remember do so in future post.

The syntax error is caused from not closing the statement properly.

Code Is...
    If Not IsEmpty(Cells(i, 1) Then
Code should be...
    If Not IsEmpty(Cells(i, 1)) Then