+ Reply to Thread
Results 1 to 1 of 1

Macro to dynamically select and copy data from different sheets and columns

  1. #1
    Registered User
    Join Date
    09-23-2013
    Location
    New Jersey
    MS-Off Ver
    Excel 2010
    Posts
    5

    Exclamation Macro to dynamically select and copy data from different sheets and columns

    I am just beginning working with macros and hope someone can help me meet deadline.

    I am working with large file (170K records). I can’t get data in required format using pivot so I’m drilling down from pivot summary to detail.

    - Pivot Sheet: Acct1 Acct2 Acct#
    12 49 27


    - Clicking on pivot count gives detail in 3 columns:
    Acct1 DNum1 XNum1
    Acct1 DNum2 XNum2
    Acct1 DNum3 XNum3

    … etc., where DNum and XNum can vary from 1 – 34

    - I need to transpose DNum and XNum to columns per Acct on a Summary sheet i.e.:

    Acct1 DNum1 XNum1 DNum2 XNum2 DNum3 XNum3 …. up to 34
    Acct2 DNum1 XNum1 DNum2 XNum2 DNum3 XNum3 …. up to 34 etc.

    - My original code (Macro 1) below gave me trouble moving from sheet to sheet and my code kept copying the same record. I guess I should use offset or something but just unsure how to put it together.

    - I am currently using a shorter code (Macro 2 below to at least help with the copy and transpose task but I have to already be on the correct sheet but with 170K records I’ll be here all year.

    Desperate for any help!
    Please Login or Register  to view this content.
    Moderator's Note: Don't forget your code tags. Highlight the codes the hit the "#" symbol. I'll do it for you now. Hope your issue be resolved. Thanks.
    Last edited by vlady; 10-01-2013 at 10:12 PM.

+ 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. Macro to copy 3 columns of data from multiple sheets into 3 columns on 1 sheet
    By bballdcm2007 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-15-2012, 04:37 PM
  2. Create very sheets with select rows/columns from master data file
    By oscarsonthepond in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-22-2012, 01:33 PM
  3. Select, copy and print data into separate columns
    By kelwood in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-08-2012, 03:46 PM
  4. Macro to copy columns into new sheets
    By JESSIER4025 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-07-2012, 11:40 AM
  5. Sheets(Array).Copy Dynamically
    By jonn in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-14-2008, 07:29 AM

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