+ Reply to Thread
Results 1 to 5 of 5

Help with web query dates please.

  1. #1
    Registered User
    Join Date
    12-20-2012
    Location
    Brisbane
    MS-Off Ver
    2010
    Posts
    6

    Help with web query dates please.

    Hi guys,

    New to this kind of thing (macros/xml/web queries etc), been a copy/paster for 10 years!
    I am planning to run the following 49 web queries through my template which is opened and saved
    as a new file every Saturday for archiving and database collecting.

    CELL C43 http://www.tabonline.com.au/2012/12/22/SR02.html
    CELL C75 http://www.tabonline.com.au/2012/12/22/SR03.html
    CELL C106 http://www.tabonline.com.au/2012/12/22/SR04.html
    CELL C137 http://www.tabonline.com.au/2012/12/22/SR05.html
    CELL C168 http://www.tabonline.com.au/2012/12/22/SR06.html
    CELL C199 http://www.tabonline.com.au/2012/12/22/SR07.html
    CELL C230 http://www.tabonline.com.au/2012/12/22/SR08.html
    CELL C261 http://www.tabonline.com.au/2012/12/22/SR09.html
    CELL C292 http://www.tabonline.com.au/2012/12/22/SR10.html

    CELL C323 http://www.tabonline.com.au/2012/12/22/MR01.html
    CELL C354 http://www.tabonline.com.au/2012/12/22/MR02.html
    CELL C385 http://www.tabonline.com.au/2012/12/22/MR03.html
    CELL C416 http://www.tabonline.com.au/2012/12/22/MR04.html
    CELL C447 http://www.tabonline.com.au/2012/12/22/MR05.html
    CELL C478 http://www.tabonline.com.au/2012/12/22/MR06.html
    CELL C509 http://www.tabonline.com.au/2012/12/22/MR07.html
    CELL C540 http://www.tabonline.com.au/2012/12/22/MR08.html
    CELL C571 http://www.tabonline.com.au/2012/12/22/MR09.html
    CELL C602 http://www.tabonline.com.au/2012/12/22/MR10.html

    CELL C633 http://www.tabonline.com.au/2012/12/22/BR01.html
    CELL C664 http://www.tabonline.com.au/2012/12/22/BR02.html
    CELL C695 http://www.tabonline.com.au/2012/12/22/BR03.html
    CELL C726 http://www.tabonline.com.au/2012/12/22/BR04.html
    CELL C757 http://www.tabonline.com.au/2012/12/22/BR05.html
    CELL C788 http://www.tabonline.com.au/2012/12/22/BR06.html
    CELL C819 http://www.tabonline.com.au/2012/12/22/BR07.html
    CELL C850 http://www.tabonline.com.au/2012/12/22/BR08.html
    CELL C881 http://www.tabonline.com.au/2012/12/22/BR09.html
    CELL C912 http://www.tabonline.com.au/2012/12/22/BR10.html

    CELL C943 http://www.tabonline.com.au/2012/12/22/AR01.html
    CELL C974 http://www.tabonline.com.au/2012/12/22/AR02.html
    CELL C1005 http://www.tabonline.com.au/2012/12/22/AR03.html
    CELL C1036 http://www.tabonline.com.au/2012/12/22/AR04.html
    CELL C1067 http://www.tabonline.com.au/2012/12/22/AR05.html
    CELL C1098 http://www.tabonline.com.au/2012/12/22/AR06.html
    CELL C1129 http://www.tabonline.com.au/2012/12/22/AR07.html
    CELL C1160 http://www.tabonline.com.au/2012/12/22/AR08.html
    CELL C1191 http://www.tabonline.com.au/2012/12/22/AR09.html
    CELL C1222 http://www.tabonline.com.au/2012/12/22/AR10.html

    CELL C1253 http://www.tabonline.com.au/2012/12/22/PR01.html
    CELL C1284 http://www.tabonline.com.au/2012/12/22/PR02.html
    CELL C1315 http://www.tabonline.com.au/2012/12/22/PR03.html
    CELL C1346 http://www.tabonline.com.au/2012/12/22/PR04.html
    CELL C1377 http://www.tabonline.com.au/2012/12/22/PR05.html
    CELL C1408 http://www.tabonline.com.au/2012/12/22/PR06.html
    CELL C1439 http://www.tabonline.com.au/2012/12/22/PR07.html
    CELL C1470 http://www.tabonline.com.au/2012/12/22/PR08.html
    CELL C1501 http://www.tabonline.com.au/2012/12/22/PR09.html
    CELL C1532 http://www.tabonline.com.au/2012/12/22/PR10.html

    Properties are set to overwrite existing cells which I have already in my template & database from the copy/paste method.

    These would be specific for todays file. However, come next week when I need the 49 queries in the same cells to run with a different date:
    http://www.tabonline.com.au/2012/12/29/SR02.html -->> http://www.tabonline.com.au/2012/12/29/PR10.html

    How do I avoid having to change the 49 dates manually which defeats the purpose of the time that I'm trying to save?

  2. #2
    Valued Forum Contributor
    Join Date
    05-21-2009
    Location
    Great Britain
    MS-Off Ver
    Excel 2003
    Posts
    550

    Re: Help with web query dates please.

    Quote Originally Posted by enzihsehtsilecxe View Post
    These would be specific for todays file. However, come next week when I need the 49 queries in the same cells to run with a different date:
    http://www.tabonline.com.au/2012/12/29/SR02.html -->> http://www.tabonline.com.au/2012/12/29/PR10.html
    I don't follow your logic there. The dates are the same; only the SR02 part has changed. Assuming you meant 2012/12/22 -> 2012/12/29 and the SR02 part is unchanged the following code changes the date part of each hyperlink on Sheet1 to the current date:
    Please Login or Register  to view this content.
    Test it for next week's dates by amending the code to Date + 7, instead of just Date.
    Post responsibly. Search for excelforum.com

  3. #3
    Registered User
    Join Date
    12-20-2012
    Location
    Brisbane
    MS-Off Ver
    2010
    Posts
    6

    Re: Help with web query dates please.

    Thanks yes SR02-PR10 will not change you are correct. However, where do I enter this code?

  4. #4
    Valued Forum Contributor
    Join Date
    05-21-2009
    Location
    Great Britain
    MS-Off Ver
    Excel 2003
    Posts
    550

    Re: Help with web query dates please.

    Put the code in a standard module. The code references "Sheet1", so change that name if the sheet containing the links is not called "Sheet1".

  5. #5
    Registered User
    Join Date
    12-20-2012
    Location
    Brisbane
    MS-Off Ver
    2010
    Posts
    6

    Re: Help with web query dates please.

    Tried that my friends it did not work. Could it be because I do not use hyperlinks as such but 49 web querys which I run from the data tab?

    Thanks for help so far, although I think somehow this is impossible. There should be an option in excel to search, find and replace all or part of each/all web query addresses. Seems a little odd that it does not. I have been reading the internet and seen that many others have had issues with the dates on web queries and auto-changing all of them. Cheers guys!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1