PDA

View Full Version : Solved: Match 2 fields and paste 2 values



pcarmour
01-08-2013, 02:14 PM
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)

pcarmour
01-10-2013, 03:07 PM
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.

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

pcarmour
01-12-2013, 06:10 AM
Hi, Does anyone have a suggestion on how I can do this?

pcarmour
01-26-2013, 07:12 AM
With Thanks to CodeNinja on a separate thread this has been solved.
See Attached