LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default finding records

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding Unique records eva cheng Excel Discussion (Misc queries) 3 April 30th 10 01:32 PM
Finding Unmatched Records PA New Users to Excel 2 April 21st 10 03:47 PM
Finding duplicate records Susan Excel Worksheet Functions 4 March 10th 08 10:07 PM
Code not finding records ojackiec Excel Programming 3 December 21st 05 04:49 PM
Finding unique records from a list. Shanks Excel Discussion (Misc queries) 4 February 24th 05 10:01 AM


All times are GMT +1. The time now is 09:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"