I don't get a syntax error with that code, there must be something else interfering.
But I would strongly recommend not using it. Performing (potentially) hundreds of GoalSeek operations each time you move to a different cell looks like a bad idea to me.
Did this solve your problem?
Sorry this didn't help.
Great! Thanks for marking this as the answer.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this response?
Thanks for your feedback.