+ Reply to Thread
Results 1 to 4 of 4

Insert copied data, leave rows in tact...

  1. #1
    Valued Forum Contributor
    Join Date
    03-23-2008
    Location
    Tennessee
    MS-Off Ver
    Office 2007
    Posts
    706

    Insert copied data, leave rows in tact...

    The snippet of code below selects a range of data from one workbook, and inserts it above existing data in another workbook.

    Please Login or Register  to view this content.
    Here's my problem. The sheet I am copying from contains 14 columns with data, (A thru N). The sheet I am copying TO contains 17 columns of data, (A thru Q). I need to copy columns with data in the orignal sheet from A7:N7 down, then insert it into the new sheet from D2:Q2, moving existing data down, but also need to move existing data in column A thru C down the same amount, still leaving those cell blank. (I have got to get other data from the sheet, and paste it into column A thru C.)

    Hope this was clear enough, and thanks in advance.

  2. #2
    Forum Contributor SOS's Avatar
    Join Date
    01-26-2004
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2003
    Posts
    327
    Hi hutch,

    I modified your code slightly and it seems to work. You just have to change the name of the sheet in wbTemp (z:\PO Response Tracking - Master.xls) to ensure that you copy from the right sheet.


    Please Login or Register  to view this content.
    Hope this helps

    Seamus

  3. #3
    Valued Forum Contributor
    Join Date
    03-23-2008
    Location
    Tennessee
    MS-Off Ver
    Office 2007
    Posts
    706

    Not Exactly...

    Greetings, Gurus.

    The suggestion by SOS doesn't do what I needed it to do, so I thought I would include examples with my description.

    I have attached two workbooks to this message. The first one, "PO Response #...." is an example of a PO response received from the supplier. The second, "PO Response Tracking - Master", is the tracking log that I need to copy the "exceptions" to.

    Here's the scenario:

    When the PO response is received from the supplier, the buyer runs a macro which highlights only the "exceptions", or parts needing changes, and copies them to the sheets titled "Qty. Changes" and "Price Changes". I want to add another part to the macro which will copy these exceptions to a log on the network. I would prefer inserting the new data above existing data, but they can be copied at the bottom of the log, if that's easier, so there is no need to determine how many rows need to be inserted.

    You will see from the formats of the two workbooks that the fields are nearly identical, with the exception of the first 3 columns. I need to take the data from the headings of the two "changes" sheets and copy them down beside each row of data added. This is so each part has an associated vendor number, PO number and date. These headings will always be the same on both sheets in each PO response.

    I hope this helps to clear things up, and thanks in advance for any help you can offer.

    Jerry
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    03-23-2008
    Location
    Tennessee
    MS-Off Ver
    Office 2007
    Posts
    706

    Bump...

    Bump...

    BTW, the format of the PO Response is set, as vendors have already started using the template, but the formatting of the tracking log is flexible. I was thinking it may be easier to move the repeated elements, (Vendor #, PO # and Date), to the right of the newly inserted data and then fill it in. That way, ALL of the existing data moves down when you insert the rows, and you can easily fill in the blank rows from row 2 down to the pre-existing data.

    Make sense? (This gets me around my problem of insertng data and then pasting the repeating data to the left of it.) It would be ugly, but I think I could do this. I'll post back with my code for further suggestions on cleaning it up.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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