vba procedure to capture multiple cell values

rny1mrxl

New Member
Joined
Jun 17, 2011
Messages
15
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
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Forum statistics

Threads
1,212,933
Messages
6,110,759
Members
448,295
Latest member
Uzair Tahir Khan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top