+ Reply to Thread
Results 1 to 10 of 10

Conditional copy paste values to new sheet. (WB Attached)

  1. #1
    Forum Contributor
    Join Date
    08-19-2010
    Location
    UK.
    MS-Off Ver
    Excel 2007
    Posts
    142

    Conditional copy paste values to new sheet. (WB Attached)

    Can someone help with this please? I need a macro to compile a statement consisting of details from multiple invoices.

    Idea for method.
    Find & copy 5 cell values from each sheet in the workbook that match two conditions, then paste them into the end sheet.

    Full instructions included on attached workbook.
    Attached Files Attached Files
    Last edited by Mayweed; 02-04-2011 at 05:06 PM. Reason: Simplify over cooked description

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Conditional copy paste values to new sheet. (WB Attached)

    No attached workbook
    Martin

  3. #3
    Forum Contributor
    Join Date
    08-19-2010
    Location
    UK.
    MS-Off Ver
    Excel 2007
    Posts
    142

    Re: Conditional copy paste values to new sheet. (WB Attached)

    Thanks for pointing that out, I've now attached the workbook.

  4. #4
    Forum Contributor
    Join Date
    08-19-2010
    Location
    UK.
    MS-Off Ver
    Excel 2007
    Posts
    142

    Re: Conditional copy paste values to new sheet. (WB Attached)

    Can anyone point me in the right direction?

  5. #5
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Conditional copy paste values to new sheet. (WB Attached)

    Can you provide an updated example with some numbers in it on all the sheets so that the instructions can be correctly interpreted?

  6. #6
    Forum Contributor
    Join Date
    08-19-2010
    Location
    UK.
    MS-Off Ver
    Excel 2007
    Posts
    142

    Re: Conditional copy paste values to new sheet. (WB Attached)

    OK. New workbook uploaded (instructions inside).

  7. #7
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Conditional copy paste values to new sheet. (WB Attached)

    This piece of macro code might do it...

    Please Login or Register  to view this content.
    Open up the VBA editor by hitting ALT F11

    Insert a new module by hitting Insert - Module

    Paste the macro into the empty sheet

    Hit ALT F11 to get back to the worksheet.

    Run the macro by going to tools-macro in Excel 2003 or the view ribbon in Excel 2007.

  8. #8
    Forum Contributor
    Join Date
    08-19-2010
    Location
    UK.
    MS-Off Ver
    Excel 2007
    Posts
    142

    Re: Conditional copy paste values to new sheet. (WB Attached)

    Thank you, that code works perfectly.
    Two more questions.
    I originaly asked for the values to be copied to the end sheet, on reflection I should have asked for them to be copied to a sheet that's always in position 4 (i.e. 4th. sheet from the left).

    1. If this is possible could you please tell me what to change in the code that you supplied?

    2. Would it also be possible to delete the blank cells between the last entry and the sub total row?
    Last edited by Mayweed; 02-07-2011 at 02:06 AM.

  9. #9
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Conditional copy paste values to new sheet. (WB Attached)

    Try this...

    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    08-19-2010
    Location
    UK.
    MS-Off Ver
    Excel 2007
    Posts
    142

    Re: Conditional copy paste values to new sheet. (WB Attached)

    Martin,
    Thanks again for the code, it's working but I'm still having a problem getting it to work the way I want it to.
    Would you mind taking a look at the workbook for me if I e-mail it to you?
    Through my limited knowledge of VBA and this forum I've created a monster that I'm rapidly losing control over. I would upload it here, but I prefer not to let it loose in the wild just yet.

+ 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