R
RobcPettit
Hi, Others today have already kindly helped with my queries today, for
which Im grateful. I though Id post this to see if it helps with the
questions I m asking. Below is my attempt, xsum are normal variables
and runner are static. I was looking at this and seeing if I could use
a for/next with it, as I wish to add many more runners, and with prev
help Ive used Dim xsum(1 to 4) which is ok, but Im struggling with the
static variables.
For y = UBound(Runner1) - 20 To UBound(Runner1)
x20sum1 = x20sum1 + Runner1(y)
x20sum2 = x20sum2 + Runner2(y)
x20sum3 = x20sum3 + Runner3(y)
x20sum4 = x20sum4 + Runner4(y)
Next y
This is what Ive attempted but doesnt work. I though diefine the
runners individually.
For i = 1 to 4
For y = UBound(Runner(i)) - 20 To UBound(Runner(i))
x20sum(i) = x20sum(i) + Runner(i)(y)
Next y
Next i
I cant get past '+ Runner(i)(y)' which is a syntax error. Any ideas
how to rewrite this.
Regards Robert
which Im grateful. I though Id post this to see if it helps with the
questions I m asking. Below is my attempt, xsum are normal variables
and runner are static. I was looking at this and seeing if I could use
a for/next with it, as I wish to add many more runners, and with prev
help Ive used Dim xsum(1 to 4) which is ok, but Im struggling with the
static variables.
For y = UBound(Runner1) - 20 To UBound(Runner1)
x20sum1 = x20sum1 + Runner1(y)
x20sum2 = x20sum2 + Runner2(y)
x20sum3 = x20sum3 + Runner3(y)
x20sum4 = x20sum4 + Runner4(y)
Next y
This is what Ive attempted but doesnt work. I though diefine the
runners individually.
For i = 1 to 4
For y = UBound(Runner(i)) - 20 To UBound(Runner(i))
x20sum(i) = x20sum(i) + Runner(i)(y)
Next y
Next i
I cant get past '+ Runner(i)(y)' which is a syntax error. Any ideas
how to rewrite this.
Regards Robert