Legatosmash
New Member
- Joined
- Aug 19, 2011
- Messages
- 1
Hi,
I am relatively new to the world of Macros. I currently have a spreadsheet that is retrieving data from a website. The search part of the url is variable based upon an ID number contained in a certain cell. I wish to obtain data from this website on all relevant ID numbers. To do this, I am currently having a macro just add 1 to the previous ID number and retrieve the data. However, the ID numbers are not all in a continuous sequence. Thus, I will have hundreds of numbers that are attempting to retrieve data where none exists. This adds about 19 hours of useless run-time onto the task.
I have a column on a separate worksheet with all of the known valid ID numbers I want data for. Is there a macro that will allow me to go through that list and have each ID number periodically be entered into the cell that tells the website which data to retrieve? For example:
<pre>
A B C
ID# Search Term Cell Retrieved Data
1 18 18 (Data for ID#18)
2 22
3 35
</pre>
So, what I have right now is a macro that, in this case, would add 1 to B1 and retrieves the data for 19 next. As there is no 19, the data is void. What would I have to do to get B1 to go 18, then 22, then 35 (the real spreadsheet has about 20,000 valid ID numbers)? FYI, It is not feasible to have a separate retrieval for every cell because of the way the retrieval works in my spreadsheets right now. Also, keep in mind that column A is actually located on a different worksheet than columns B & C and I already have an active worksheet specific macro that would run in conjunction with this one on a different worksheet.
I am relatively new to the world of Macros. I currently have a spreadsheet that is retrieving data from a website. The search part of the url is variable based upon an ID number contained in a certain cell. I wish to obtain data from this website on all relevant ID numbers. To do this, I am currently having a macro just add 1 to the previous ID number and retrieve the data. However, the ID numbers are not all in a continuous sequence. Thus, I will have hundreds of numbers that are attempting to retrieve data where none exists. This adds about 19 hours of useless run-time onto the task.
I have a column on a separate worksheet with all of the known valid ID numbers I want data for. Is there a macro that will allow me to go through that list and have each ID number periodically be entered into the cell that tells the website which data to retrieve? For example:
<pre>
A B C
ID# Search Term Cell Retrieved Data
1 18 18 (Data for ID#18)
2 22
3 35
</pre>
So, what I have right now is a macro that, in this case, would add 1 to B1 and retrieves the data for 19 next. As there is no 19, the data is void. What would I have to do to get B1 to go 18, then 22, then 35 (the real spreadsheet has about 20,000 valid ID numbers)? FYI, It is not feasible to have a separate retrieval for every cell because of the way the retrieval works in my spreadsheets right now. Also, keep in mind that column A is actually located on a different worksheet than columns B & C and I already have an active worksheet specific macro that would run in conjunction with this one on a different worksheet.