+ Reply to Thread
Results 1 to 2 of 2

Copy/pasting data in varying columns depending on data in several different cells

  1. #1
    Forum Contributor
    Join Date
    06-25-2013
    Location
    Longview, TX
    MS-Off Ver
    MS365
    Posts
    338

    Copy/pasting data in varying columns depending on data in several different cells

    Hi there!

    I've been struggling with this for over a day now and it's driving me up a wall!

    I have a lot of random data that is in sections grouped by style/color/size/store. I need to move parts of it into columns to the right of the data with each style/color/size having its own set of columns and the stores and qtys received vertically under the heading. Parsing them out by size should automatically separate them by style/color.

    In the spreadsheet I'm attaching, going down column J, if a cell says "SZ", everything from there to the next instance of "SZ" is its own section. So, then, in the second column past the last column of data, in row 1 I need to paste (in order going left to right) A7, I6, K6, A9. Then, in column P, below "STR", vertically, I need B7-M7, which are stores, and in S, below RECV, I need B9-M9. Below THOSE I need B10-M10 and B12-M12.

    THEN, I need to find the next instance of "SZ" in column J, this need to start over, but putting the data into columns U-X. This needs to continue on to the right for as long as the data continues going down in A-M.

    I pieced together a macro that did part of what I wanted, except that it wanted to post ALL of the data in really long columns in P-S. When I tried to fix it to increment columns to the right, I broke it and now I can't even get it back to how I had it then.

    So, here's the broken coding that I have now:

    Please Login or Register  to view this content.
    I'm tired of looking at it and probably should just go back to doing this by hand, but now it has made me mad so I just want to beat it!

    Can anyone help me finish/fix this? I'm probably overthinking it and making it much harder than it needs to be, so feel free to tell me so, if that's the case.

    Thank you!!

    Jenny

    I just realized that a couple of my references are bad when compared to the spreadsheet I attached and are now giving me a new problem! Originally, I was working with a sheet where I had deleted some lines at the top, hence these 4 lines at the top of my code:
    Please Login or Register  to view this content.
    My text in the post was right ("in the second column past the last column of data, in row 1 I need to paste (in order going left to right) A7, I6, K6, A9"), just the coding is wrong. Sorry, I've just been looking at this too long. But that gives me the new problem of how to get STR, CLR, SZ and RECV into those header cells; I can't figure out how to reference them.
    Attached Files Attached Files
    Last edited by zookeepertx; 11-19-2014 at 05:59 PM. Reason: because I type without thinking sometimes

  2. #2
    Forum Contributor
    Join Date
    06-25-2013
    Location
    Longview, TX
    MS-Off Ver
    MS365
    Posts
    338

    Re: Copy/pasting data in varying columns depending on data in several different cells

    (Bump).....

+ 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. Replies: 6
    Last Post: 08-15-2014, 08:17 PM
  2. [SOLVED] Copy non-contiguous cells and varying data types
    By JimDandy in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-31-2014, 02:52 PM
  3. [SOLVED] Copy and Pasting Data in Columns Based on Criteria
    By forexcellence13 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-07-2013, 07:47 PM
  4. vba matching columns of data and copy/pasting to new row on different sheet
    By maybefrog in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-27-2011, 07:36 PM
  5. Replies: 1
    Last Post: 02-20-2009, 11:15 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