Can someone explain or show me some sample code that stores computed information in a loop as a variable?
Basicall I have to calculate the assests in certain strategies. Each strategy can have certain funds/accounts in them. (Look Below)
Strategy Fund %Invested AUM
Long Alpha 100.00% 5
Long Beta 100.00% 10
Long Gamma 100.00% 20
Short ABC 100.00% 12
Short Alpha 20.00% 5
Straegy = column A
Fund = column B
%invested = column c
So above you have two different strategies Long and Short. The same fund can be invested in two different strategies. I want to create a loop that takes every line it finds the word long in column A it multiplies the %Invested x the AUM( first line would be 100*5) and stores that answer as and then goes to the second line, does the same thing and adds it to the orignal computation. The mathmatical expression for lop two would be ( Answer from loop one + (100%*10)). This process would continue until line three because line 4 is a different strategy. Before it is done with computting all the AUM in the long strategy i want to store the sum of the three loops in a variable.
Anyone have some code that can help me out?
Basicall I have to calculate the assests in certain strategies. Each strategy can have certain funds/accounts in them. (Look Below)
Strategy Fund %Invested AUM
Long Alpha 100.00% 5
Long Beta 100.00% 10
Long Gamma 100.00% 20
Short ABC 100.00% 12
Short Alpha 20.00% 5
Straegy = column A
Fund = column B
%invested = column c
So above you have two different strategies Long and Short. The same fund can be invested in two different strategies. I want to create a loop that takes every line it finds the word long in column A it multiplies the %Invested x the AUM( first line would be 100*5) and stores that answer as and then goes to the second line, does the same thing and adds it to the orignal computation. The mathmatical expression for lop two would be ( Answer from loop one + (100%*10)). This process would continue until line three because line 4 is a different strategy. Before it is done with computting all the AUM in the long strategy i want to store the sum of the three loops in a variable.
Anyone have some code that can help me out?