+ Reply to Thread
Results 1 to 3 of 3

Trying to copy/paste multiple grouped columns across a workbook to another worksheet

  1. #1
    Registered User
    Join Date
    10-07-2013
    Location
    New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    1

    Trying to copy/paste multiple grouped columns across a workbook to another worksheet

    Good afternoon. I am trying to write a macro that will take grouped data in columns A&B, C&D, E&F, G&H, ... and paste it one under the other in a new workbook. The data consists of Product Number and Inventory. An example of the data:

    Product Inventory Product Inventory Product Inventory
    A12314 112 A5588 11 B5587 10
    B1158 0 C55478 100 D5587 5

    I want to transpose the data onto a new workbook so I see:
    Product Inventory
    A12314 112
    B1158 0
    A5588 11
    C55478 100
    B5587 10
    D5587 5

    Current vba copies data to new worksheet, but stacks Col A,B,C,D,E,F... in same column.

    Please Login or Register  to view this content.
    I appreciate any and all help.
    Regards,
    Marc
    Last edited by mreisbe; 10-25-2013 at 04:42 PM. Reason: Updating VBA to comply with rules - thanks for feedback.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Trying to copy/paste multiple grouped columns across a workbook to another worksheet

    But try this:

    Please Login or Register  to view this content.
    Directions for running the routine(s) just supplied

    Copy the code to the clipboard

    Press ALT + F11 to open the Visual Basic Editor.

    Open a macro-enabled Workbook or save your Workbook As Macro-Enabled

    Select “Module” from the Insert menu

    Type "Option Explicit" then paste the code under it

    And, you should be ready to go

    With the cursor between Sub and End Sub press F5 (F8 to Single Step)

    OR

    Press ALT + Q to close the code window.

    Press ALT + F8 then double click on the macro name
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Trying to copy/paste multiple grouped columns across a workbook to another worksheet

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

+ 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. [SOLVED] Copy/Paste multiple columns as values based on another columns criteria
    By Dgp2012 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-28-2013, 06:50 AM
  2. [SOLVED] Faster way to copy and paste multiple columns in Sheet1 to corresponding columns in Sheet2
    By babbeleme1 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-19-2013, 12:55 AM
  3. Open Multiple Files, Copy Worksheet, Paste in to Specific Tab in Original Workbook
    By freybe06 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-30-2013, 10:27 AM
  4. [SOLVED] Copy multiple worksheets data & paste into blank columns in summary worksheet
    By guest99999 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-21-2013, 09:56 AM
  5. Macro to copy and paste columns from one workbook to a new workbook
    By windcloud2 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-05-2012, 11:45 AM

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