Hi,
I have a question reguarding ranking variables so I can perform a calculation based on the most needed first, then second most needed etc. I am doing this in the code of a form.
I have eight Variables, just call them v1, v2,v3...etc
made up values
v1 v2 v3 v4 v5 v6 v7 v8
10 5 2 12 17 9 9 13
If you rank these in order this will make them:
v5-17
v8-13
v4-12
v1-10
v6-9
v8-9
v2-5
v3-2
Basically I need some code that will rank them by variable name so that it knows which variable needs the most work, in this instance v5. Once it knows that v5 is in most need it will perform a calculation, say add 35% of its total to a variable x.
so therefore x= v5 * .35 + x
I know I need a loop but I'm clueless as to how to creat this.
Any help would be greatly appreciated.
Thanks
Tom
I have a question reguarding ranking variables so I can perform a calculation based on the most needed first, then second most needed etc. I am doing this in the code of a form.
I have eight Variables, just call them v1, v2,v3...etc
made up values
v1 v2 v3 v4 v5 v6 v7 v8
10 5 2 12 17 9 9 13
If you rank these in order this will make them:
v5-17
v8-13
v4-12
v1-10
v6-9
v8-9
v2-5
v3-2
Basically I need some code that will rank them by variable name so that it knows which variable needs the most work, in this instance v5. Once it knows that v5 is in most need it will perform a calculation, say add 35% of its total to a variable x.
so therefore x= v5 * .35 + x
I know I need a loop but I'm clueless as to how to creat this.
Any help would be greatly appreciated.
Thanks
Tom