+ Reply to Thread
Results 1 to 11 of 11

copy till last used row of a column and paste it into another column of another sheet

  1. #1
    Registered User
    Join Date
    01-01-2014
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2013
    Posts
    26

    copy till last used row of a column and paste it into another column of another sheet

    Every week I get data with random number of rows and I need to rearrange those data in certain order so it can accommodate with our system.

    I have attached spreadsheet and would appreciate your assistance with macro to address following issue

    1. need to find last used row and copy column I on sheet("internal") and paste to A2 in sheet("Int-SendOut")
    2. need to find last used row and copy column H on sheet ("Internal") and paste to B2 in sheet("Int-SendOut")
    3. need to find last used row and copy column C on sheet("Internal") and paste to C2 in sheet(Int-Sendout")

    I am wondering what would be vba code to achieve the result based on last used row.

    Thank you very much in advance for your assistance.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,565

    Re: copy till last used row of a column and paste it into another column of another sheet

    Hi there,

    Try this:

    Please Login or Register  to view this content.
    Regards,

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  3. #3
    Registered User
    Join Date
    01-01-2014
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2013
    Posts
    26

    Re: copy till last used row of a column and paste it into another column of another sheet

    Hi Robert,

    Thanks. I use the above code but it is only returning value on row 2 of sheets("Int-SendOut"). Is there any way we can get all data till last used row from sheets("Internal") and have them pasted on sheets("Int-SendOut")

    Kind regards

  4. #4
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,565

    Re: copy till last used row of a column and paste it into another column of another sheet

    Oh, OK. Try this:

    Please Login or Register  to view this content.
    Regards,

    Robert

  5. #5
    Valued Forum Contributor mangesh.mehendale's Avatar
    Join Date
    06-04-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    510

    Re: copy till last used row of a column and paste it into another column of another sheet

    hii

    Try this ...

    Please Login or Register  to view this content.
    Don`t care, take care...

    Regards,
    Mangesh

  6. #6
    Valued Forum Contributor mangesh.mehendale's Avatar
    Join Date
    06-04-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    510

    Re: copy till last used row of a column and paste it into another column of another sheet

    Hii Trebor76,
    What is this coding nice ...

    Let me know about
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    01-01-2014
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2013
    Posts
    26

    Re: copy till last used row of a column and paste it into another column of another sheet

    Thank you Robert. Such a nice and perfect code I would have never learnt on my own. I was never aware that we can use copy paste array as you have used. Much appreciated your time and effort.

    Kind regards

  8. #8
    Registered User
    Join Date
    01-01-2014
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2013
    Posts
    26

    Re: copy till last used row of a column and paste it into another column of another sheet

    Thank you Mangesh for your time and effort. I have used Robert's code as it is short and sweet.

  9. #9
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,565

    Re: copy till last used row of a column and paste it into another column of another sheet

    Hi Trebor76,
    What is this coding nice ...

    Let me know about
    varMyCols In Array("I-A", "H-B", "C-C")
    These are the columns the data is being copied from and to. For instance, column I to column A fro the first block. The varMyCols variable picks up each set of columns which are then split by the minus symbol "-" in the strMyCols array.

    HTH

    Robert

  10. #10
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,565

    Re: copy till last used row of a column and paste it into another column of another sheet

    Thank you Robert. Such a nice and perfect code I would have never learnt on my own. I was never aware that we can use copy paste array as you have used. Much appreciated your time and effort.
    You're welcome. Always extra happy to help a fellow Aussie

  11. #11
    Valued Forum Contributor mangesh.mehendale's Avatar
    Join Date
    06-04-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    510

    Re: copy till last used row of a column and paste it into another column of another sheet

    Quit hard because I am beginner .... Thanks...

+ 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: 1
    Last Post: 05-30-2015, 04:38 PM
  2. [SOLVED] Macro to copy and paste only unique values from one column to another column in same sheet
    By Manish_Gupta in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-19-2014, 05:44 AM
  3. copy column and it's row value till column blank found
    By nareshkt in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-23-2013, 03:20 AM
  4. Copy entire selected column to next columns till last column
    By siroos12 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-22-2013, 05:20 AM
  5. Copy Paste and Loop till last column with data
    By eirumba in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-08-2011, 07:23 AM
  6. Copy and Paste Multiple Cells in the same row till last Last Column
    By dagindi in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-20-2010, 03:40 PM
  7. Copy and Paste till last Last Column
    By dagindi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-16-2010, 05:43 PM

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