Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
use the vlookup worksheet function in the one worksheet to retreive the data
related to the value in column A in the 119 rows. Assume both worksheets have the same values in column A. in B2 =if(countif(Data!A:A,$A2)0,Vlookup($A2,Data!$A$2: $M$50001,Column(),False),"") then drag across to column M (in the example) and down to row 119 since this is programming, in code Sub GetData() with Worksheets("Sheet1").Range("B2:M120") .Formula = "=Vlookup($A2,Data!$A$2:$M$50001,Column(),Fals e)" on Error Resume Next .SpecialCells(xlFormulas,xlErrors).ClearContents on Error goto 0 .Formula = .Value end with End sub -- Regards, Tom Ogilvy "wayne" wrote in message ... I have one worksheet with about 119 rows of data. I have the data in column A that I want to lookup in another worksheet(about 50,000 rows) and when I find the matching record I want to write out that row of data for the match. Thank you for your help. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Finding Unique records | Excel Discussion (Misc queries) | |||
Finding Unmatched Records | New Users to Excel | |||
Finding duplicate records | Excel Worksheet Functions | |||
Code not finding records | Excel Programming | |||
Finding unique records from a list. | Excel Discussion (Misc queries) |