Results 1 to 14 of 14

Returning Data from website but excluding certain URLs

Threaded View

ScabbyDog Returning Data from website... 01-24-2016, 08:35 PM
ScabbyDog Re: Returning Data from... 01-25-2016, 06:07 AM
ScabbyDog Re: Returning Data from... 01-25-2016, 10:23 AM
ScabbyDog Re: Returning Data from... 01-26-2016, 08:14 AM
AB33 Re: Returning Data from... 01-26-2016, 08:40 AM
ScabbyDog Re: Returning Data from... 01-26-2016, 08:41 AM
AB33 Re: Returning Data from... 01-26-2016, 08:50 AM
ScabbyDog Re: Returning Data from... 01-26-2016, 08:54 AM
AB33 Re: Returning Data from... 01-26-2016, 08:56 AM
ScabbyDog Re: Returning Data from... 01-26-2016, 08:59 AM
AB33 Re: Returning Data from... 01-26-2016, 09:03 AM
ScabbyDog Re: Returning Data from... 01-26-2016, 09:09 AM
AB33 Re: Returning Data from... 01-26-2016, 09:23 AM
ScabbyDog Re: Returning Data from... 01-26-2016, 09:48 AM
  1. #1
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Returning Data from website but excluding certain URLs

    On Sheet1 from column A row 2 downwards I have a list of URLs. I have the below code which loops through all the URLs and then it calls another macro which does stuff with the data it gets. However, I want to alter it so that each URL it loops through, it also pastes this URL onto sheet "URLs" in column A in the last used row. When the below macro starts and looks at the first URL to get data from it should only get the data if the URL is NOT contained within column A on sheet URLs.

    Sub Start()  
      Dim i As Integer
        
      For i = 2 To 350  
     
      Dim b As String
    
       b = Worksheets("Sheet1").Cells(i, 1)
           
       Sheets("SHeet2").Select
    
        With ActiveSheet.QueryTables.Add(Connection:= _
            "URL;" & b, Destination:=Range("$A$1"))
            .Name = _
            "site.php?id=2083&brand=qf&status=RU&tipo=CALCIO&disc=CALCIO&manif=BUND_1"
                  .FieldNames = True
            .RowNumbers = False
            .FillAdjacentFormulas = False
            .PreserveFormatting = True
            .RefreshOnFileOpen = False
            .BackgroundQuery = True
            .RefreshStyle = xlInsertDeleteCells
            .SavePassword = False
            .SaveData = True
            .AdjustColumnWidth = True
            .RefreshPeriod = 0
            .WebSelectionType = xlSpecifiedTables
            .WebFormatting = xlWebFormattingNone
            .WebTables = "2,3,5,6,8,9,11,12,14,15,16"
            .WebPreFormattedTextToColumns = True
            .WebConsecutiveDelimitersAsOne = True
            .WebSingleBlockTextImport = False
            .WebDisableDateRecognition = False
            .WebDisableRedirections = False
            .Refresh BackgroundQuery:=False
        End With
       
         Call DoStuffWithDataPulledFromURL
        
        Next i
      
    End Sub
    Last edited by ScabbyDog; 01-24-2016 at 08:40 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Grab URLs on a Website
    By gautum123 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-22-2015, 12:58 PM
  2. website scrapiplping to get data from multiplepages of website
    By mpatil in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-17-2015, 05:00 AM
  3. Replies: 0
    Last Post: 03-23-2015, 10:35 AM
  4. Returning Average value while excluding error values
    By Stromming in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-02-2014, 04:13 PM
  5. Opening website, getting data, closing website
    By beta_leonis in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-27-2012, 03:50 AM
  6. Converting text URLs to hyperlinked URLs
    By ranchhand in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-25-2011, 01:46 PM
  7. Replies: 23
    Last Post: 04-25-2006, 01:10 PM

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