+ Reply to Thread
Results 1 to 7 of 7

Copy values from one sheet to another as per given criteria in sheet nr 3

  1. #1
    Registered User
    Join Date
    10-07-2012
    Location
    PL
    MS-Off Ver
    Excel 2010
    Posts
    4

    Copy values from one sheet to another as per given criteria in sheet nr 3

    Hi,

    I'm very new in the VBA world but I know some less/more things about the code, but right now I'm looking
    for solution for the new challenge which is very difficult for me ..or maybe I unable to find the answer which maybe is very easy.

    I have one file with 3x spreadsheets :

    - 1st spreadsheet(1) is with the DATA with about 12 columns of data and 400-600 rows. First row is the header, the rest rows are the data.
    - 2nd spreadsheet(2) it's a target for the DATA (from nr1) - it's a 8 columns table with the header.
    - 3rd spreadsheet(3) is the ten cells-table with the "criteria" , eg there is 5 cells with a 5 words, the rest 5 cells are empty (If there will be need for the other criteria it will appear in the table.

    The challenge:
    I'm looking for the right code which will be looking in (1) for the correct rows where in column A will be match with the criteria from table in (3)
    and if there will be correct rows , then the code will copy them to the (2) but not the whole rows but only the values from the 8 first columns ( information in columns 9-12 are not needed, but they need to stay in (1) ).

    Could someone can help me with the code or will help in finding the right solution ?

  2. #2
    Valued Forum Contributor
    Join Date
    03-17-2012
    Location
    Warsaw, Poland
    MS-Off Ver
    2007/2010
    Posts
    555

    Re: Copy values from one sheet to another as per given criteria in sheet nr 3

    please attach an example workbook - you'll get your code within minutes after that.

    thanks
    If you think that my answer was helpful, please click on the "Add to this user's Reputation" button.

  3. #3
    Registered User
    Join Date
    10-07-2012
    Location
    PL
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Copy values from one sheet to another as per given criteria in sheet nr 3

    Please review the attached - example :

    EXAMPLE.xls





    Quote Originally Posted by Bishonen View Post
    please attach an example workbook - you'll get your code within minutes after that.

    thanks

  4. #4
    Valued Forum Contributor
    Join Date
    03-17-2012
    Location
    Warsaw, Poland
    MS-Off Ver
    2007/2010
    Posts
    555

    Re: Copy values from one sheet to another as per given criteria in sheet nr 3

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-07-2012
    Location
    PL
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Copy values from one sheet to another as per given criteria in sheet nr 3

    Wow, very nice ! Thank you a lot.

    I would like to ask for one little favor: could you please add something that when the macro is used 2 times in a row,
    the data from 2nd time is not pasted immediately under the previous in sheet(2) but there will be blank row / separator.

  6. #6
    Valued Forum Contributor
    Join Date
    03-17-2012
    Location
    Warsaw, Poland
    MS-Off Ver
    2007/2010
    Posts
    555

    Re: Copy values from one sheet to another as per given criteria in sheet nr 3

    Ale tylko dlatego, bo jesteś Polakiem :P

    Please Login or Register  to view this content.
    The code above is way too big for that task ^^ in self-justification I'd like to add, that I'm watching Seinfeld on my second monitor :>

  7. #7
    Registered User
    Join Date
    10-07-2012
    Location
    PL
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Copy values from one sheet to another as per given criteria in sheet nr 3

    Powiem jedno - kawal dobrej roboty, ogromne dzieki !

    In spite of the movie on the 2nd monitor .... it's still a good piece of work ! Thanks a lot !

+ 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