+ Reply to Thread
Results 1 to 7 of 7

macro to copy/paste based on a criteria

  1. #1
    Registered User
    Join Date
    10-09-2012
    Location
    nederland
    MS-Off Ver
    Excel 2003
    Posts
    6

    macro to copy/paste based on a criteria

    Hello all,

    In the past you helped me a lot, so I’m hoping you could help me again.
    I’m looking for a macro which does 4 things:

    - On “blad1” all used cells must be cleared, from cell A7 up to colum AS. In the attachment these would be all the cells with the name “bla” .
    - When on “blad 2” there is a 1 in colum AI it has to copy the row up to colum AE. (in the example these say “copy”)
    - After this it should be pasted on “blad 1” starting at A7.
    - As final item it should copy the cells from “blad 3” A1 up to N1 (named “punt 4”) and paste it in “blad 1” behind the all rows it just copied from “blad 2”, colums AF up to AS (under de headers marked as “something”).

    The list it would copy will have a different size every time this macro will be used.

    I hope I’m being clear enough and someone can help me.
    Attached Files Attached Files
    Last edited by winger; 11-27-2012 at 09:51 AM.

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

    Re: macro to copy/paste based on a criteria

    Try this one
    Please Login or Register  to view this content.
    Last edited by AB33; 11-26-2012 at 01:46 PM.

  3. #3
    Registered User
    Join Date
    10-09-2012
    Location
    nederland
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: macro to copy/paste based on a criteria

    did not expect an answer that fast, thanks :D

    Tried it out and it works except for 1 thing

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    this line pastes it below the records in blad1, instead of putting them behind them under the header "something" (this part i could fix)
    but it also only pastes it once instead of behind every row which is in use. (this part i cant fix)

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

    Re: macro to copy/paste based on a criteria

    Winger,

    This should do your first request, but I am not sure when you said "but it also only pastes it once instead of behind every row which is in use. (this part i cant fix) "
    Please Login or Register  to view this content.
    Could you please show me in a sample?

  5. #5
    Registered User
    Join Date
    10-09-2012
    Location
    nederland
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: macro to copy/paste based on a criteria

    added the same file as before but now after i ran the macro
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    10-09-2012
    Location
    nederland
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: macro to copy/paste based on a criteria

    After alot of searching i found what i needed frinish the macro in another topic.
    Still i wanna thank you for your trouble, you still helped me alot :D

    the bit of code i still needed:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Formula: copy to clipboard
    Please Login or Register  to view this content.

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

    Re: macro to copy/paste based on a criteria

    Please Login or Register  to view this content.

+ 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