Macro for Getting Cell Info

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.
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Forum statistics

Threads
1,224,568
Messages
6,179,595
Members
452,927
Latest member
whitfieldcraig

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