Skip to main content
15-Moonstone
Jan 13, 2026 10:17 AM UTC
Solved

Must be a factor

Hi there

I have a problem with this function . The issue is R is a cumulative value so the R2=R0+R1> 

R3= R0+R1+R2 and so on... I wanted to implement that in this function but an error ( must be a vector ) shows 

Is there a way to fix this or to write it differently 

YA_10963798_0-1768299322575.png

Thanks 

The sheet is attached prime 11 

Werner_E
Werner_EAnswer
25-Diamond I
Jan 13, 2026 11:53 AM UTC

Not sure if these are the values you need

Werner_E_0-1768305136148.png

 

40 replies

Werner_E
Werner_E25-Diamond IAnswer
25-Diamond I
Jan 13, 2026 11:53 AM UTC

Not sure if these are the values you need

Werner_E_0-1768305136148.png

 

Translate
15-Moonstone
Jan 13, 2026 11:58 AM UTC

Hi Werner 

Is this value calculating the sum of the layers before?

YA_10963798_0-1768305456978.png

Thanks 

 

Translate
Werner_E
25-Diamond I
Jan 13, 2026 12:13 PM UTC

@YA_10963798 wrote:

Hi Werner 

Is this value calculating the sum of the layers before?

I have no idea WHAT this expression calculates, but it definitely calculates a sum of products of values based on previous R-calculations. We are calculating Ri+1, so Ri already exists as long as we define R1 somewhere in front of the loop.

You original approach

Werner_E_0-1768306038136.png

would not have calculated any sum (apart from the fact that it tried to use value not even existing at the time of calculation). Mi and Ri are simple scalar values and so is their product. There is nothing to sum up.

It's like writing

Werner_E_1-1768306321941.png

There is nothing to sum up (would need vectors, not scalars) and Prime even throws an error in that case (I would have expected the result 12).

 

 

Translate