Copy and paste of multiple rows into single row if condition mets

  • My data
    1 2 3 4 A
    5 6 7 8 B
    9 10 11 12 A
    13 14 15 16 C


    I want a macro that will copy the data if E coloumn have A If E coloumn have A then copy Complete row till next A in in E coloumn means From row1 row2 &row3And paste the data (copied rows)into sheet 2 in 1 row
    Sheet2
    A B C D E F G H I J K L M N O-Columns
    1 2 3 4 A 5 6 7 8 A 9 10 11 12 A-Pasted data


    I want the data to look like this i have lots of data so give me the code according to that

  • Re: Copy and paste of multiple rows into single row if condition mets


    Code has been tested before being posted ...


    May be you would like to attach a sample workbook ...

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Re: Copy and paste of multiple rows into single row if condition mets


    Hello,


    Understand the importance of the separate sets ...


    But the question is : What are the conditions which will determine the various intervals ???


    With your examples : Set 1 goes from 1 to 3 ... then Set 2 goes from 6 to 9 ... why ? it should be from 6 to 8 ... no ?


    Thanks for your clarification

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Re: Copy and paste of multiple rows into single row if condition mets


    We cant judge the intervals u just set it to 200 that is enough means within this limit the code should work

  • Re: Copy and paste of multiple rows into single row if condition mets


    That is the data carim so we cant do anything for interval that u have to set bro

  • Re: Copy and paste of multiple rows into single row if condition mets


    It can be anything my job is to copy the data from 1st A then B and then last A to make a 1 set so plz look into it and solve it bro and thnx for ur Support in finding the solution of my problem

  • Re: Copy and paste of multiple rows into single row if condition mets


    My understanding, to create what you call 1 Step, is that you have a 3 step process describes as follows :


    1. Find first A
    2. Find first B after A
    3. Find last A after first B and first A


    Is this correct ?

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Re: Copy and paste of multiple rows into single row if condition mets


    Quote from Carim;787893

    My understanding, to create what you call 1 Step, is that you have a 3 step process describes as follows :


    1. Find first A
    2. Find first B after A
    3. Find last A after first B and first A


    Is this correct ?


    Yaa u r correct carim

  • Re: Copy and paste of multiple rows into single row if condition mets


    Quote from Carim;787893

    My understanding, to create what you call 1 Step, is that you have a 3 step process describes as follows :


    1. Find first A
    2. Find first B after A
    3. Find last A after first B and first A


    Is this correct ?


    Yaa u r right carim

  • Re: Copy and paste of multiple rows into single row if condition mets


    And rest u know carim after copying we have to paste the data to sheet 2, pasting condition is same as i told u in the start any doubts carim ?

  • Re: Copy and paste of multiple rows into single row if condition mets


    Hello ...


    Just made a quick series of several tests ... with no success ...


    It looks like a complex issue ... with many headaches ...:hammerhe:


    Will try again later ...

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Re: Copy and paste of multiple rows into single row if condition mets


    No prpblem bro but i need the vba code so try tomorrow and solve my problem gn sd tc

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!