+ Reply to Thread
Results 1 to 4 of 4

Macro to select data based in a search term and populate a table

  1. #1
    Registered User
    Join Date
    08-02-2012
    Location
    Viņa del Mar, Chile
    MS-Off Ver
    Excel 2003
    Posts
    5

    Question Macro to select data based in a search term and populate a table

    Hi guys,
    o)
    I needed to retrieve data from a web page (Report names and dates) automatically using a Web Query in Excel. So far I have been able to retrieve the data (thanks to a macro that I found in this forum) using this code

    Please Login or Register  to view this content.
    After I run the macro I get the data in the following format and in multiple tabs:

    Please Login or Register  to view this content.
    I need to create a table containing the fields Date and Report Name, in this case would be

    Date |Report Name
    July 23, 2012 | Huawei Takes on The Global Enterprise Market

    The ideal scenario would be having all the projects and dates in a single table in one tab.

    Please guys, I really need some help on this... I'm a beginner.

    Thanks in advance and best regards,

    Gabriel Valck

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,784

    Re: Macro to select data based in a search term and populate a table

    Not sure of how you whish to sort your data. I've tested the "Web Query" macro and got 18 sheets.

    Only the first sheet contains a string starting with "Report:Huawei" so my macro loops through all the sheets and delete the one that does not contain this string.

    It will only save the 1st sheet even if the string "Report:Huawei" is not found as you can not delete all sheets in a workbook it must contain at least one sheet.


    Please Login or Register  to view this content.
    You now need to show how the and what part of the data should be extracted as there are more than 500 hundred lines in sheet1. I wouls suggest upload a sample file with both "raw" data and "structured" data.

    Alf

  3. #3
    Registered User
    Join Date
    08-02-2012
    Location
    Viņa del Mar, Chile
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Macro to select data based in a search term and populate a table

    Thanks a lot Alf... I'll give it a try.


  4. #4
    Registered User
    Join Date
    08-02-2012
    Location
    Viņa del Mar, Chile
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Macro to select data based in a search term and populate a table

    Thanks a lot Alf... I'll give it a try.


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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