+ Reply to Thread
Results 1 to 7 of 7

Looping help needed.

  1. #1
    Registered User
    Join Date
    12-24-2017
    Location
    Paramus, United States
    MS-Off Ver
    2010
    Posts
    50

    Looping help needed.

    I have a list of 400 stock symbols in cell A1 of an excel spreadsheet. I then go to a macro and load this website:

    https://finviz.com/quote.ashx?t=" & Range("A1").Value

    The macro, parsehtml below pulls data into excel from 400 snapshot stock tables. The results load starting in row 1-400 of the spreadsheet.

    The problem is that 400 is the limit of snapshot stock tables you can bring in on 1 page and I have many more.

    Therefore, I have to have a second page

    https://finviz.com/quote.ashx?t=" & Range("A2").Value

    I want the results from page 2 to load in row 401 to 800, however they are overwriting the data in row 1-400.

    Does anyone know how make the results from page 2 continue starting in row 401?

    For testing purposes, I've attached a file with only 7 items in Cell A1 and 7 items in Cell A2. Thanks for the help.


    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    02-09-2009
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    380

    Re: Looping help needed.

    Hiya, sorry I don't have time to look at it properly but it sounds like you're not resetting the upper and lower limit of the range you're working with. You're working with rows 1 - 400 first, then you're not assigning a value of 401 - 800.

    Sorry I know that's not much help.

    Please Login or Register  to view this content.
    There's probably something I'm overlooking but hopefully this at least gets you on to a research pathway to success.

  3. #3
    Registered User
    Join Date
    12-24-2017
    Location
    Paramus, United States
    MS-Off Ver
    2010
    Posts
    50

    Re: Looping help needed.

    Hi, no that doesn't work. It just starts everything in row 401-800 and then overwrites the next 400 in the same 401-800 area. Thanks though

  4. #4
    Forum Contributor
    Join Date
    02-09-2009
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    380

    Re: Looping help needed.

    Thanks, sorry about that, just to state the obvious, you're putting it in the second loop right?

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    12-24-2017
    Location
    Paramus, United States
    MS-Off Ver
    2010
    Posts
    50

    Re: Looping help needed.

    Yes, I don't know how to get it put the first 400 lines in Cells 1 to 400 and then the next 400 lines in Cells 401-800. Actually, there will even be more going all the way to 4,000 lines.

    Thanks

  6. #6
    Forum Contributor
    Join Date
    02-09-2009
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    380

    Re: Looping help needed.

    I'll try to have a look at this tonight, so that particular block of code with 2 loops is the overall process.

    Sounds like you need a parent object loop, which would loop dynamically for each table in the workbook. Are all these tables conglomerated into the same workbook?

    It looks like you're parsing them into the workbook from a webpage?

    Sorry I know I'm not giving this proper attention.

  7. #7
    Registered User
    Join Date
    12-24-2017
    Location
    Paramus, United States
    MS-Off Ver
    2010
    Posts
    50

    Re: Looping help needed.

    Yes, the data is coming in from 2 pages from a web site. I want the results all on one 1 excel spreadsheet from lines 1 through 800. So currently, the first 400 come in from page 1 of the website like I want but the next 400 from page 2 of the website overwrite the first 400 instead
    of continuing on line 401 through 800.

    Thanks,

    Vince

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Help needed with looping through multiple folders and calling macros
    By maym in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-18-2017, 09:22 PM
  2. [SOLVED] NON-VBA: FORMULA NEEDED - Looping through string and stop on non-numeric
    By dluhut in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-09-2014, 12:37 PM
  3. [SOLVED] Looping Help needed in Recorded Macro
    By zaska in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-03-2012, 11:03 PM
  4. Simple Looping Example needed
    By msmithdynamicsgp in forum Word Programming / VBA / Macros
    Replies: 3
    Last Post: 06-12-2011, 09:45 PM
  5. A spreadsheet for a coil winder - looping help needed!
    By HankMcSpank in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-09-2009, 09:46 AM
  6. Looping macro needed to find intersections of rows and columns
    By Clifford Middleton in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-05-2006, 09:10 AM
  7. Help needed - seriously (looping? macros? formulas?)
    By jarski in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-29-2005, 01:05 PM

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