+ Reply to Thread
Results 1 to 10 of 10

Copy from clientsheet to Masterinvoice sheet with macro

  1. #1
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,119

    Copy from clientsheet to Masterinvoice sheet with macro

    HI I have a sheet called "Masterinvoice", where i can fill out the form for the invoice. When done i can save the info in sheet"Clientetotal"
    In the first free row.
    The macro i use basically copy the cells i want to copy from my Masterinvoice sheet.
    What i need is the other way around. So when i either doubleclick a cell or rightclick in sheet "Clientetotal"(maybe in columnA only) It will copy all in this row, back to my form sheet called "Masterinvoice".
    I need it to copy exactly back to below cells in below code(Sheet"Masterinvoice")

    And you can see in my copytest sheet how i want it to come back, when i i double click in sheet "Clientetotal".

    Please have a look and see if you have a working solution.

    Thanks in advance

    Sincerely

    Abjac

    This is how the code look when i copy it from "Masterinvoice" to "Clientetotal. But i need the other way with a double click.


    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Copy from clientsheet to Masterinvoice sheet with macro

    Please Login or Register  to view this content.
    add a button to Worksheets("Clientetotal") for running the above code, the select a cell on the row to be copied and clic on the button
    If solved remember to mark Thread as solved

  3. #3
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,119

    Re: Copy from clientsheet to Masterinvoice sheet with macro

    HI Patel. Sorry was a little too fast. I just need to know how the code will look, if i take out to copy M34,M36,M38.
    I tried but it gave me a subscribt out of range error. And i could not make it work with this.

    Please have a look, if you can do the code without these.

    So what have to be copied is .
    Please Login or Register  to view this content.
    Thanks

    Abjac
    Last edited by abjac; 04-07-2013 at 05:55 AM.

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Copy from clientsheet to Masterinvoice sheet with macro

    Abjac,
    Alan will be copied in to master sheet, what happens to the rest? Will they also be copied somewhere in to second sheet? If the format is going to be the same, you could add a helper column and copy in to each cell.

  5. #5
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,119

    Re: Copy from clientsheet to Masterinvoice sheet with macro

    HI Ab33.
    What i basically try to make is an invoice system. And try to make it as simple as possible.
    The masterinvoice sheet is infact a invoice form in real. SO i cant put anything extra in here, because it will move the columns.
    I have found out of to save each invoice in a folder. And now i want to be able to save the invoice in sheet Clientetotal.
    I think it will work fine, i just now infact found of off, that i need to have more columns to copy. So i can also store, what prices i have put in there.

    I have think found a great way to do that, so i dont have to find the saved original invoice, but can just mark the row, and it will copy all info in to the masterinvoice sheet, where the form is.
    So i guess just now mm i need to change Patels great code, because it will be with more cells to copy back to the masterinvoice sheet.

    I will put a solution up here later on. I think it will be quite good.

    Sincerely
    Abjac

  6. #6
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,119

    Re: Copy from clientsheet to Masterinvoice sheet with macro

    Hi Patel.

    I needed to change the setup a little. I realized that i needed more cell to be copied.

    Could you have a look if you can change your code so it cover the extra cells?
    I only want to copy back to from sheet "clientetotal" from column A to AF, not the last 5 from Ag to AK

    So from A to AF from sheet "Clientetotal" to the correct cells in Sheet "Masterinvoice"

    Please have a look thanks

    Below is also the original sheet, so you can see how it will be.

    Thanks
    Abjac

    Here i the new code i use to copy from Masterinvoice to sheet clientetotal.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Copy from clientsheet to Masterinvoice sheet with macro

    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,119

    Re: Copy from clientsheet to Masterinvoice sheet with macro

    HI Just saw i have made a stupid error. The code is working Patel also with the new cells. Sorry its a great code. Thanks

    Here it is.
    Thanks

    Sincerely
    Abjac


    Please Login or Register  to view this content.

  9. #9
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Copy from clientsheet to Masterinvoice sheet with macro

    you owe me a filling

  10. #10
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,119

    Re: Copy from clientsheet to Masterinvoice sheet with macro

    Haha Yes i wish i could do that haha. But this is some i make for a good friend of mine, who have a little clinic. But if you come here, for sure i can convince him to make a filling free haha

+ 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