+ Reply to Thread
Results 1 to 8 of 8

How can I copy and paste info from one sheet to another via macro

  1. #1
    Forum Contributor
    Join Date
    05-14-2007
    Posts
    117

    How can I copy and paste info from one sheet to another via macro

    Hello Everyone!

    I am Hoping there is a simple solution to my problem. Basically I have to worksheets, the first is filled out and at the end Ive place a button that I would like to open the second sheet and fill in cells that have duplicate info from the first, so just copy & paste but kind of automated for speed, is this possible and would anyone be kind enough to help me out please?

    I have only got as far as opening the second document with the macro, after that im stuck!

    The Info I would like to be copied across from the "service Diary" to the "Service Report" would be As follows:
    *CUSTOMER
    *CONTACT
    *MACHINE TYPE
    *SERIAL NUMBER
    *QUOTE NUMBER
    *ORDER NUMBER

    Many Thanks

    Jamie C
    Attached Files Attached Files
    Last edited by jamie.c; 06-04-2009 at 07:07 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    05-14-2009
    Location
    gold coast
    MS-Off Ver
    Excel 2007
    Posts
    843

    Re: How can I copy and paste info from one sheet to another via macro

    Try
    For the customer feild
    if the Service Visit Report MASTER.xls is opened
    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor
    Join Date
    05-14-2009
    Location
    gold coast
    MS-Off Ver
    Excel 2007
    Posts
    843

    Re: How can I copy and paste info from one sheet to another via macro

    I Noticed that you want the file saved as the S/N

    You could try
    Please Login or Register  to view this content.
    This will allow you to save the file as the S/N and another range like Customer if you wanted and will also add the date to it.

  4. #4
    Forum Contributor
    Join Date
    05-14-2007
    Posts
    117

    Re: How can I copy and paste info from one sheet to another via macro

    Good morning,

    Thank you for your reply, Ive just added your code to the macro and I doesnt do anything, do you have any ideas?

    Thanks again for your time

    Jamie.c

  5. #5
    Valued Forum Contributor
    Join Date
    05-14-2009
    Location
    gold coast
    MS-Off Ver
    Excel 2007
    Posts
    843

    Re: How can I copy and paste info from one sheet to another via macro

    You could run the code on buttion click or when the workbook is closed.

    This Code Needs Both Workbooks Open, Ive Used Paste Special To Not Change The Differances Layout Betweent The Two Sheets. Cell Ranges Need To Be Changes For *CONTACT*MACHINE TYPE*SERIAL NUMBER*QUOTE ECT
    Please Login or Register  to view this content.
    This Will Open The WorkBook For You, The Workbooks.Open Filename:= Need To Be Changes To Suit Your Setup.

    Please Login or Register  to view this content.
    You Would Need To Change Cell Range's, Im Not Sure If It Will Work With Merges Cells.
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    05-14-2007
    Posts
    117

    Re: How can I copy and paste info from one sheet to another via macro

    Hello Everyone,

    Im wondering if anyone would be able to explain line by line how the reply from D-Rennie works, I hoping Il be able to understand what changes need making to enable it to work on my worksheet.

    Any Help would be much appreciated

    Jamie.c

  7. #7
    Valued Forum Contributor
    Join Date
    05-14-2009
    Location
    gold coast
    MS-Off Ver
    Excel 2007
    Posts
    843

    Re: How can I copy and paste info from one sheet to another via macro

    Select the following code
    Please Login or Register  to view this content.
    Copy Code
    open workbook service Diary
    Open visual basic editor
    double click this workbook.
    paste the code
    close visual basic editor
    insert buttion on sheet and assign macro to TheTestBtn
    open Service Report since the code will need it open
    go back to service Diary click button.


    Now play with the other codes.
    Let me know how it goes-
    Cheers
    Last edited by D_Rennie; 06-09-2009 at 07:39 AM.

  8. #8
    Forum Contributor
    Join Date
    05-14-2007
    Posts
    117

    Re: How can I copy and paste info from one sheet to another via macro

    Hello,

    Thank you so much for your reply.

    Ive had a play and something is happening!! not quite how I wanted it but never the less.

    I have got the report opening with the "creat report" button In cell U7 of the service dairy and I have added your code which seems to be taking part of the address off of the service report sheet (A7) Brindley close....................... and adding it in to cell B16. of the service report.

    Do you know where it is going wrong please? I have very little knowledge of code, and I struggle to know what I am looking for!

    Thank you in advance

    Jamie.c
    Attached Files Attached Files

+ 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