Consulting

Results 1 to 4 of 4

Thread: Solved: Match 2 fields and paste 2 values

  1. #1
    VBAX Contributor
    Joined
    Nov 2012
    Location
    Billericay, Essex
    Posts
    145
    Location

    Solved: Match 2 fields and paste 2 values

    Hi,
    I have a large database named 'Holdings' with over 26,000 rows.
    Then I have about (a changing number) 200 rows of data in columns K-N.
    My task is to find and match the CLT REF in Column K with the CLT REF in Column A, Then find and match the ISIN in Column L with the ISIN in Column C.
    Once both fields have matched I need to copy the data from the relevant row columns M and N and paste this data into Columns F and G of the matched Row. Please see attached with CLT REF's 1141, 2498 and 2705 as an example of how it should look.
    Any help would again be very much appreciated.

    I am working with Windows Home Premium version 6.1.7601 SP 1 Build 7601and Excel version 14.0.6123.5001 (32 bit)
    Attached Files Attached Files
    Regards, Peter.

  2. #2
    VBAX Contributor
    Joined
    Nov 2012
    Location
    Billericay, Essex
    Posts
    145
    Location
    I Have called cell I1 "Holdings" and using the following code can find the first requirement but how can I then select all the same CLT REF cells below this, if there are any, to then find the second search requirement?

    I hope someone can please help.

    [VBA] Sub Find()

    Sheets("Sheet1").Select
    With Worksheets("Sheet1")

    .Range(.Range("I1").Value).Find(What:=.Range("K2").Value, _
    LookIn:=xlValues, _
    LookAt:=xlWhole, _
    SearchOrder:=xlByRows, _
    SearchDirection:=xlNext, _
    MatchCase:=False, _
    SearchFormat:=False).Activate
    End With

    End Sub
    [/VBA]
    Regards, Peter.

  3. #3
    VBAX Contributor
    Joined
    Nov 2012
    Location
    Billericay, Essex
    Posts
    145
    Location
    Hi, Does anyone have a suggestion on how I can do this?
    Regards, Peter.

  4. #4
    VBAX Contributor
    Joined
    Nov 2012
    Location
    Billericay, Essex
    Posts
    145
    Location
    With Thanks to CodeNinja on a separate thread this has been solved.
    See Attached
    Attached Files Attached Files
    Regards, Peter.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •