Skip to main content
Best answer by Werner_E

I guess that "lookup" is more suitable for your needs than "match".

See if the attached helps. It was necessary to use " -d " because the values in vectors d are positive, but the values in the vectors z are negative!

Werner_E_0-1712412194929.png

Prime 9 file attached

 

2 replies

ttokoro
21-Topaz I
21-Topaz I
April 6, 2024

image.pngimage.pngimage.pngimage.png

What is the meaning of below the answer you want?

image.png

t.t.
14-Alexandrite
April 6, 2024

d is the length while z is the depth I want these two values to be always associated with each other and then connected them to Q values

Werner_E25-Diamond IAnswer
25-Diamond I
April 6, 2024

I guess that "lookup" is more suitable for your needs than "match".

See if the attached helps. It was necessary to use " -d " because the values in vectors d are positive, but the values in the vectors z are negative!

Werner_E_0-1712412194929.png

Prime 9 file attached

 

14-Alexandrite
April 6, 2024

That works perfectly for some and not for others, How can I solve this problem?

YA_10963798_0-1712436341900.png

YA_10963798_0-1712439580950.png

 

 

 

25-Diamond I
April 6, 2024

What you show is a completely different situation!
For instance is q.c;tip a FUNCTION and NOT A VECTOR, so you can't index it with the range variabe i.n. Thats what the error message tries to tell you. You can often trace back an error to its root using the the tracing option on the calculation ribbon.

 

To achieve what you possibly try to do, you may use

Werner_E_0-1712439514560.png

Here looping through the values in the z and q.cza vectors is done using the range variable i.n.

 

But you can also do it without that range variable. With the following approach the looping is achieved using vectorization:

Werner_E_1-1712439701879.png

 

A third approach uses an explicit programmed for-loop to do the job. A bit more space consuming but maybe also a bit clearer to read and understand:

Werner_E_2-1712439899343.png

 

So you have the choice 😉

 

Prime 9 sheet attached