vba procedure to capture multiple cell values
hi folks,
ok, new to this forum, so if my presentation is lacking, please let me know so i can fix as appropriate.
here's what i do now and what i'd like to do going forward:
current process:
1. enter a stock ticker in cell B1
2. click a button in cell B2
3. the button calls a procedure that does the following:
- take the ticker, go to yahoo, and get price statistics (date, open, hi, lo, close) for 150days
- build a row per day of these statistics
- save the workbook as "ticker symbol".csv
proposed process:
1. have a watchlist of tickers in a range like A1:A50
2. select any number of tickers (by holding down the CTRL key) and build an array of tickers
3. click the same button in cell B2
3. read and iterate the array in the 'go to yahoo' procedure
- do what i did before
- save the workbooks, 1 workbook per ticker, as before
i tried doing this by recording a macro. let's just say it was embarassing. i'm lucky to have escaped with my life.
basically, i don't know how to save the selected cell values (the tickers) into an array to pass to the 'go to yahoo' procedure.
if anyone can help tell me where the string starts, that would be great.
thanks,
ron
hi folks,
ok, new to this forum, so if my presentation is lacking, please let me know so i can fix as appropriate.
here's what i do now and what i'd like to do going forward:
current process:
1. enter a stock ticker in cell B1
2. click a button in cell B2
3. the button calls a procedure that does the following:
- take the ticker, go to yahoo, and get price statistics (date, open, hi, lo, close) for 150days
- build a row per day of these statistics
- save the workbook as "ticker symbol".csv
proposed process:
1. have a watchlist of tickers in a range like A1:A50
2. select any number of tickers (by holding down the CTRL key) and build an array of tickers
3. click the same button in cell B2
3. read and iterate the array in the 'go to yahoo' procedure
- do what i did before
- save the workbooks, 1 workbook per ticker, as before
i tried doing this by recording a macro. let's just say it was embarassing. i'm lucky to have escaped with my life.
basically, i don't know how to save the selected cell values (the tickers) into an array to pass to the 'go to yahoo' procedure.
if anyone can help tell me where the string starts, that would be great.
thanks,
ron