+ Reply to Thread
Results 1 to 5 of 5

Copy Multiple Column Data from Last row excluding header into worksheet in same workbook

  1. #1
    Registered User
    Join Date
    12-01-2017
    Location
    New Jersey
    MS-Off Ver
    2016
    Posts
    63

    Copy Multiple Column Data from Last row excluding header into worksheet in same workbook

    I need to copy 20 columns of data using complete columns length excluding header into worksheet in same workbook and place the copy data uniquely in columns under last used row but only paste values I worked on the code below but don't know how to only paste values. I also noticed that the code recognized the last used row, but still went up one and overwrote the last used row. Can I add a paste values function to what I have or declare the copy or pste function as a value somewhere else

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Copy Multiple Column Data from Last row excluding header into worksheet in same workbo

    It is not so easy to answer without Excel sample, but perhaps try
    changing
    Please Login or Register  to view this content.
    by
    Please Login or Register  to view this content.
    and do the same for other statement
    - Battle without fear gives no glory - Just try

  3. #3
    Registered User
    Join Date
    12-01-2017
    Location
    New Jersey
    MS-Off Ver
    2016
    Posts
    63

    Re: Copy Multiple Column Data from Last row excluding header into worksheet in same workbo

    HI PCI
    Thank You for the help. I had to adjust slightly. I'm assuming the (1,2) you had in the code was row & column. When I flipped them it inserted properly. I also had to remove the additional.End(xlUp) code. Even though it was set as LastRow it would recalculate and move upward if the last filled cell didn't equal the other columns
    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Copy Multiple Column Data from Last row excluding header into worksheet in same workbo

    (1,2) means same row and 1 column on the right from the cell concerned
    .End(xlUp) code is used to determine the last cell in the column for the cell concerned and it is cirrect you do not need it as you are using Cells(yLastRow, "A") where the last row is already fixed.
    Is OK now ??

  5. #5
    Registered User
    Join Date
    12-01-2017
    Location
    New Jersey
    MS-Off Ver
    2016
    Posts
    63

    Re: Copy Multiple Column Data from Last row excluding header into worksheet in same workbo

    Yes Everything is OK now Thanks for explaining and for the support

+ 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] VBA to copy header once and specific columns to new worksheet within the same workbook
    By majana54 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-22-2019, 11:57 PM
  2. Find column with specific header and copy it to another workbook
    By Mohamed Hassan in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-28-2018, 11:02 AM
  3. [SOLVED] Copy column data from multiple worksheets to single worksheet based on header criteria
    By nateaskins in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 03-21-2014, 10:42 AM
  4. Copy data in columns E:G to different workbook with worksheet = value in column C
    By Luffk73 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-30-2013, 09:07 AM
  5. Copy/Paste range of data excluding certain rows and copy to another workbook
    By HoerbigAdm in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-12-2012, 02:51 PM
  6. Merge multiple worksheet to summary worksheet based on column header value match
    By rafiomeon in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 11-23-2012, 03:37 AM
  7. Replies: 1
    Last Post: 06-20-2006, 02:50 PM

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