+ Reply to Thread
Results 1 to 6 of 6

copy a row of data to sheet 2

  1. #1
    Registered User
    Join Date
    06-16-2017
    Location
    Australia
    MS-Off Ver
    2003,2007
    Posts
    37

    copy a row of data to sheet 2

    Hi all, I would like to copy a row of data from sheet 1 to sheet 2 to different cells , then print the desired result on sheet 2.
    As the data in sheet 1 is added to every day, i need to keep the data , but somehow find a way to only copy the next row down .

    exp : Copy row of data then print and then go back to the next row down on sheet 1 , and when i add new data on the next row i need to copy that row.

    Attached is an example .

    Thankyou all in advance.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    06-29-2014
    Location
    Australia
    MS-Off Ver
    MSO 365
    Posts
    1,095

    Re: copy a row of data to sheet 2

    Hello Bobjet,

    Try the following code placed in the Sheet1 module:-


    Please Login or Register  to view this content.
    The code makes Column E the active or target column so your last data entry per row needs to be in column E. This will be the active cell that executes the code.
    I've used the range(K1:O1) in sheet2 (the destination sheet) as a helper range in this scenario.

    To implement this code:-

    - Right click on the Sheet1 tab.
    - Select "View Code" from the menu that appears.
    - In the big white code field that then appears, paste the above code.

    I hope that this helps.

    Cheerio,
    vcoolio.
    Last edited by vcoolio; 08-16-2019 at 03:02 AM. Reason: Additional line of code.

  3. #3
    Registered User
    Join Date
    06-16-2017
    Location
    Australia
    MS-Off Ver
    2003,2007
    Posts
    37

    Re: copy a row of data to sheet 2

    Hi vcoolio,
    Thank you very much for your hard work , it works great. I just have obe more question , I tried adding a ".Display" before the print line and got nowhere. Can i add print preview some where ??

    Once again Much appreciated.

  4. #4
    Valued Forum Contributor
    Join Date
    06-29-2014
    Location
    Australia
    MS-Off Ver
    MSO 365
    Posts
    1,095

    Re: copy a row of data to sheet 2

    Hello Bobjet,

    I'm glad to have been able to assist and thanks for the rep!

    For "Print Preview", replace this line of code:-
    Please Login or Register  to view this content.
    with this:-

    Please Login or Register  to view this content.
    You'll then need to run the print from the Print Preview page that appears.

    Cheerio,
    vcoolio.

    P.S. I've just noticed that I've repeated theses two lines of code:-

    Please Login or Register  to view this content.
    Just remove the two lines higher up the code.

    Sorry about that!!
    Last edited by vcoolio; 08-16-2019 at 07:40 AM. Reason: Add P.S.

  5. #5
    Registered User
    Join Date
    06-16-2017
    Location
    Australia
    MS-Off Ver
    2003,2007
    Posts
    37

    Re: copy a row of data to sheet 2

    Once again , thankyou 👍,

  6. #6
    Valued Forum Contributor
    Join Date
    06-29-2014
    Location
    Australia
    MS-Off Ver
    MSO 365
    Posts
    1,095

    Re: copy a row of data to sheet 2

    No worries Bobjet! You're welcome.
    Take it easy.

    Cheerio,
    vcoolio.

+ 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: 02-09-2017, 05:36 AM
  2. Replies: 1
    Last Post: 02-09-2017, 05:30 AM
  3. Replies: 2
    Last Post: 01-23-2016, 01:16 PM
  4. Replies: 1
    Last Post: 06-05-2013, 07:03 AM
  5. Replies: 0
    Last Post: 05-21-2013, 03:09 PM
  6. Copy Data from a fixed form of data sheet into a master excel sheet.....
    By sirimhk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-18-2012, 08:48 AM
  7. [SOLVED] Copy and paste data from sheet 2 to sheet 1 based on specific criteria on sheet 1
    By VBADUD in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2012, 04:18 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