+ Reply to Thread
Results 1 to 4 of 4

find copy paste loop multiple results

  1. #1
    Registered User
    Join Date
    10-15-2012
    Location
    perth
    MS-Off Ver
    Excel 2007
    Posts
    2

    find copy paste loop multiple results

    Hi,

    So here is what I have "sheet 1" is an import sheet which imports data from a XLS folder which in turn is created from another program.

    the import sheet can have 1 item or over 1000 items, which list down column "A"eg. see attached
    Untitled.jpg

    all other columns stagnate so the headings will never change. just the information in each cell may change

    now because I have multiples of the same item but with different and same values what i think i need is a vba macro that can search for a few different things and at the end of that copy and paste the values on "sheet 2" (calcualtions sheet)

    so for eg.

    if column "A" = "clnm4000" and if column "B" = "110" then find all the matches for the first two arguments and copy all results that corresponds in column "C" to "sheet 2" from "A1" I hope that make sence.

    but becuse my kwnolage of vba is extremly limmited i cant figure out how to loop this code that i found in a post below and copy all the matched results from column "C" to sheet2

    Please Login or Register  to view this content.
    thank you for any responce in advance
    MTB1
    Last edited by arlu1201; 10-16-2012 at 05:42 AM. Reason: Use code tags in future.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: find copy paste loop multiple results

    Your jpg attachment will not help us much. Why not attach a sample "excel" file?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    10-15-2012
    Location
    perth
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: find copy paste loop multiple results

    Hi arlu1201,

    I cant give you the original because it has clients information with in it but I have coppied the relevant information to a clean work book.

    please see attached.

    Regards
    MTB1
    Attached Files Attached Files

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: find copy paste loop multiple results

    if column "A" = "clnm4000" and if column "B" = "110" then find all the matches for the first two arguments and copy all results that corresponds in column "C" to "sheet 2" from "A1" I hope that make sence.
    So only columns A - C should be copied to Sheet2?

    What are the other conditions to be checked? (Some users ask that i show them how to code one condition and they will do the rest, but i would say, atleast let me show you 2-3 conditions, because there could be a shorter way of doing it than just repeating the if condition.)

+ 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