February 27, 201510 yr not sure what to call this but I would like to turn these two arrays: array1: A, B, C array2: 1, 2, 3, 4, 5, 6, 7, 8 into this: 1A, 2B, 3C, 4A, 5B, 6C, 7A, 8B Was playing with: GetValue ( array2 ; loop ) & GetValue ( array1 ; mod ( loop ; ValueCount ( array1 ) ) ) Just get stuck on mod ( 3 ; 3 ) which I can handle with an if statement but would rather let math solve it.
February 27, 201510 yr It works with Zero indexed arrays... So your second half should be ... & GetValue(array1; (mod(loop-1;valueCount(array1))+1) loop -1 will simulate zero index array and give you the correct result if you do some shifting: mod(0;3) = 0 ->add 1 to get 1 (a) mod(1;3)=1 -> 2( mod(2;3) = 2 >-3© Hope this helps.
March 5, 201510 yr Hi Gismo, We have a Code button that will allow you to post your code so that it look likes you intended. it is the <> above in the Reply to this topic.
March 5, 201510 yr @rivet, glad that did the trick for you! @Lee, Thanks....now where is the "edit" button on my post?
March 5, 201510 yr It should appear, along with (Report Blog this, Edit MultiQuote and Quote very light gray in the body. If you don’t see them, just make a new reply to this post and use the Code button and repost the code in it. Edited March 5, 201510 yr by Lee Smith
March 5, 201510 yr @Lee I don't see it for my first post, but I do see them for my recent post earlier today. Is there a reason for that? I'll repost my answer below with code brackets. Answer: GetValue(array1; (mod(loop-1;valueCount(array1))+1) It works with Zero indexed arrays... So your second half should be ... & GetValue(array1; (mod(loop-1;valueCount(array1))+1) loop -1 will simulate zero index array and give you the correct result if you do some shifting: mod(0;3) = 0 ->add 1 to get 1 (a) mod(1;3)=1 -> 2( mod(2;3) = 2 >-3© Hope this helps.
March 5, 201510 yr @Lee I don't see it for my first post, but I do see them for my recent post earlier today. Is there a reason for that?" I think there is a time limit for members to edit their post. My guess is 24 hours, and or if there has been replies to your post.
Create an account or sign in to comment