Hello everyone,
I am looking for some help in getting a macro to query multiple webpages and then sort that data to see if three file types are within the table. From there I want the file types to be separated into 3 lists that save to 3 txt files.

For example: This is the base url for the site. http://www.pangaeadata.com/OCC_Files...api=3507124329
I want the 10 digits on the end to change according to a list I have with ~1000 different sets of numbers.

The table for the URL looks like this:

http://www.pangaeadata.com/OCC_Files...api=3507124329

The ten digit number references an oil well. Which is located at the top of the table. I want to search all my wells and see what forms are available for them in excel.
Basically, I am wanting a query to search for all wells that have a 1000/1001A/1002A form filed and if it has one, I want it to put that API number into a list with others with 1000/1001A/1002A forms filed and save a txt file for each different form filed.
If possible I would like a to have a hierarchy where if a 1002A form has been filed it won't look for the other two files. ex. 1002A>1001A>1000 (if 1002A is available I want that API number saved, if there is no 1002A yet, then I want the 1001A API number saved, and so on.) I understand how to do the web query and the txt file save, but I want it to update with the latest info weekly and automatically give me a list.

Any help is very much appreciated. Im interning right now, so if I can get this to work I will look real good. Plz help.