Consulting

Results 1 to 2 of 2

Thread: Copy Rows from External Data Query

  1. #1
    VBAX Newbie
    Joined
    Jan 2009
    Posts
    1
    Location

    Copy Rows from External Data Query

    Hi Everyone,

    I'm new to the board as a member, but I've been coming here for excel tips for years, but I finally found one I couldn't quickly figure out. I have to build a report that contains a dashboard page on the front for summary data and a number of other pages for sales data in different statuses with the worksheet name being the status. Before I had a seperate external data query on each page, but that gets to be really tedious to update 8 pages across 5 regions.

    What I'm trying to do now is have one data page at the end of the worksheet to query all the data, and then have a subroutine that will go through the data page and update all the records for the current region and status. The region is held on the dashboard page in the A1 cell and the other worksheets besides the data page and the dashboard page are all named after the statuses I'm searching for.

    So in short, I need a Sub that goes to each page and clears out anything below row 1 and then goes to the data page and starting at A2, goes down the list (or goes through the Named Range "Query_From_SLXPROD") and matches up column A with the Region value held on Dashboard:A1 and looks at the worksheet name to match up column G and then copies the rows over to the worksheet with the appropriate status name starting at A2.

    Thanks guys, you can really save me on this one. I'm pretty good at adapting code once I see it, but I'm not good enough in VBA to write this from scratch.

    Scott

  2. #2
    Moderator VBAX Master georgiboy's Avatar
    Joined
    Mar 2008
    Location
    Kent, England
    Posts
    1,206
    Location
    Welcome to the forum

    Are you able to post a sample workbook with dummy data?
    Click here for a guide on how to add code tags
    Click here for a guide on how to mark a thread as solved
    Click here for a guide on how to upload a file with your post

    Excel 365, Version 2404, Build 17531.20128

Posting Permissions

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