Results 1 to 4 of 4

find copy paste loop multiple results

Threaded View

  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

    'SHEETS("USER INPUT"                 WHAT:="INSET USER INPUT"
        Sheets("IMPORTSHEET").Cells.Find(What:="WALL2000", after:=ActiveCell, LookIn:=xlFormulas, _
        LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
        MatchCase:=False, SearchFormat:=False).Activate
        '              WHAT:="INSET USER INPUT"
        Cells.Find(What:="C", after:=ActiveCell, LookIn:=xlFormulas, LookAt _
        :=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
        False, SearchFormat:=False).Copy
        'SHEETS("USER INPUT") RANGE("USER INPUT")
        Sheets("IMPORTSHEET").Range("x1").PasteSpecial Paste:=xlPasteValuesAndNumberFormats
        Application.CutCopyMode = False
    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.

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