Hello,
I don't know where to begin...
I have a file with stock tickers, action and shares in the following order:
action, shares, ticker
I want to aggregate the shares of any duplicate names with the same action.
I am trying to build this is a clean fashion as opposed to using "cells(i,1).value...
I want to build a For Each loop with an array as a variable.
Let's call it:
ticker[]
for i = 0 to FinalRow
ticker = cells(i,1).value what is the correct way to write this ticker is not vb.
cnt++
(I would like to replace cells...with an object, how can i do this. Currently a lot of my code is written in this manner and I would like to change it to variables instead)
let's continue.
So now i have
all of the different tickers in the variable ticker[]. then I want to loop through ticker[]:
for i = 0 to i < cnt
for j = 0 to j < cnt?
If ticker = ticker[j] then
shares[ticker] = cells(i,1) + cells(j,1) ' would prefer to use variables here but do not know how to set them up?
I don't know if this is complete but perhaps someone understands and can guide me.
Thanks,
Lino
I don't know where to begin...
I have a file with stock tickers, action and shares in the following order:
action, shares, ticker
I want to aggregate the shares of any duplicate names with the same action.
I am trying to build this is a clean fashion as opposed to using "cells(i,1).value...
I want to build a For Each loop with an array as a variable.
Let's call it:
ticker[]
for i = 0 to FinalRow
ticker = cells(i,1).value what is the correct way to write this ticker is not vb.
cnt++
(I would like to replace cells...with an object, how can i do this. Currently a lot of my code is written in this manner and I would like to change it to variables instead)
let's continue.
So now i have
all of the different tickers in the variable ticker[]. then I want to loop through ticker[]:
for i = 0 to i < cnt
for j = 0 to j < cnt?
If ticker = ticker[j] then
shares[ticker] = cells(i,1) + cells(j,1) ' would prefer to use variables here but do not know how to set them up?
I don't know if this is complete but perhaps someone understands and can guide me.
Thanks,
Lino