PDA

View Full Version : Web query Looping from table selection



Lehoi
05-06-2016, 11:29 AM
Hi All

I am working in a table for making predictions of soccer teams results based on basics statistics.
I know this is a difficult task and I will appreciate any advice.

What I am looking for is a way to select the Teams that I want to update their results (from a lis of 8000!). The teams list is in the worksheet "Countries and teams".

The selected Teams could be displayed in the "Main" worksheet or maybe in the same "Countries and teams" worksheet (using a checkbox, conditional format, or any other method of highlighting the selected teams).

Then the "Update" macro will loop through those selected Teams, taking the Country and the Team parameters to fill the web query URL parameters in the macro (Now I am using a listbox in C1 and E1 to select the Country and the Team manually).

When the first Team data is updated, the macro will analyze the "Has Occurred", "Current Delay" and "Highest Delay" data based on the parameters prefixed in the "Main" Worksheet.

If this Team complies with preset parameters in any of the 3 markets (Market 1, Market 2 and Market 3), then transposes the respective column (or columns) on the sheet "alarms".

For example:
The first Team selected is Real Madrid, then click "Update" button. The data is updated and the "Has Occurred", "Current Delay" and "Highest Delay" values in any of the three markets do not match the "Main" preset parameters. Then go to the next Team, and so on until one Team complies with preset parameters and transpose the column(s) to "Alarms" sheet. After that, is the turn of the next team, until all teams selected was analyzed.

when all selected teams was analyzed, if in the next update proccess any of the alarms is outdated (the parameters are not matching with the "Main" worksheet parameters, then this alarm should be deleted).

Sorry for my semi translated english

Thank you All in advance!

skywriter
05-06-2016, 12:54 PM
Cross posted. (http://www.ozgrid.com/forum/showthread.php?t=199709)

Lehoi
05-06-2016, 01:06 PM
Hi
I violated any rule? I'm just trying to get help in some important forums.

Regards

Lehoi
05-06-2016, 01:34 PM
Sorry for cross posting, I am novel in forums.
Please, moderator can delete this thread?

Jacob Hilderbrand
05-06-2016, 02:04 PM
Cross posting is allowed but you should put a link in both posts to the other post. That way people helping you on one forum or another can see if you already got an answer somewhere else.

Lehoi
05-06-2016, 02:24 PM
Ah, ok thanks for the info. I asked for delete the thread in the other forums because I didn't know this
There are 3 or 4 links, but I don't know why I can't post them in one reply.
This is the message:


"Post denied. New posts are limited by number of URLs it may contain and checked if it doesn't contain forbidden words."

Aussiebear
05-06-2016, 05:18 PM
That occurs because as a new member, you need to achieve a predefined post count before you can post links. This however does not override any requirement to indicate that you might have posted elsewhere.