You should create a discussion/question, not a blog, to get help.
Nobody would be able to add a corrected worksheet in a blog comment.
try adding x[N=0 between the N=rows() and the for loop.
(= should be the back arrow)
until you have an array x you cannot calculate the summation of x*U
When you create x[N-1 the summation requires x[N, which you have not defined. Andy suggests setting it to 0. That certainly makes the calcuation work, but you will have to decide what value x[N should actually be set to.