+ Reply to Thread
Results 1 to 3 of 3

Excel Web Query VBA - Can I loop through rows and columns?

  1. #1
    Registered User
    Join Date
    01-24-2012
    Location
    Aurora, CO
    MS-Off Ver
    Excel 2010
    Posts
    3

    Excel Web Query VBA - Can I loop through rows and columns?

    Hi all. I have been trying to scour the internet for what I am trying to do and have had little to no success. So this is my last resort.

    I am trying to run a Dynamic Web Query VBA in Excel and need a little help. I currently have a query that takes values in cells A2, B2, C2 and D3 and pulls the data to F1 on the same spreadsheet.

    What I am having problems with is trying to loop the query so it takes values in cells A4, B4, C5 and D4, enters the data into F4 and continues until it has reached two consecutive empty cells in column A.

    The code I have so far is in the VBA with the attached sample spreadsheet that shows what I am working with.

    Once I have all of the queries performed, I then have a macro that I will call that will delete all of the blank rows so I only have one header from the query.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Excel Web Query VBA - Can I loop through rows and columns?

    Try the attached.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    01-24-2012
    Location
    Aurora, CO
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Excel Web Query VBA - Can I loop through rows and columns?

    I had to change A4 to A2, but it works like a charm. Thank you soooo much!

+ 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. Loop Across Columns...If Blank Cell, Loop Down Rows
    By flindy87 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-25-2014, 07:05 PM
  2. Loop Across Columns If Blank Cell Loop Down Rows
    By flindy87 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-05-2014, 10:22 AM
  3. Loop across Columns and down Rows
    By flindy87 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-31-2014, 02:05 PM
  4. [SOLVED] For Next Loop across rows AND columns
    By GRazor71 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-31-2013, 02:05 PM
  5. Loop rows and columns
    By twomind in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-09-2011, 11:40 AM
  6. Query to populate data from rows to columns
    By tscott in forum Access Tables & Databases
    Replies: 6
    Last Post: 03-05-2011, 07:32 PM
  7. Query Data in hidden rows/columns with Query Box
    By VincetOmnia in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-12-2009, 10:53 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