ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Finding matching codes in two different columns (https://www.excelbanter.com/excel-discussion-misc-queries/234769-finding-matching-codes-two-different-columns.html)

TRMercer

Finding matching codes in two different columns
 
I have two columns of codes - Column A has 10400 codes with prices that go to
that specific code in Column B. Then I have Column C which has a selection of
1400 of those codes from Column A. Is there a way that I can take the Column
C codes and compare them to those in Column A and if there is a match put
just those that match on a different on a different worksheet - giving me a
new list of those 1400 codes with the correlating prices?

Example:
A B C
0400T 275.00 0500T
0500T 6.50 24900
12000 44.00 66000
24900 339.00 H0876
66000 112.00
99823 10.00
H0876 13.85

After run would have:
A B
0500T 6.50
24900 339.00
66000 112.00
H0876 13.85


Dave Peterson

Finding matching codes in two different columns
 
Move (or copy) the values from column C to column A of a new worksheet.

Then use a formula like:
=vlookup(a1,'originalsheetnamehere'!a:b,2,false)
and drag down those rows.

Then you could convert to values (edit|copy, edit|paste special|values) and sort
the results so that the N/A's are grouped together. Then delete those rows with
errors.

ps. Be careful with those numbers. If one location is text (like '12000) and
the other is a real number (12000), then there excel won't find a match--even
though you probably expected it.

Debra Dalgleish has lots of notes on troubleshooting =vlookup():
http://contextures.com/xlFunctions02.html#Trouble

TRMercer wrote:

I have two columns of codes - Column A has 10400 codes with prices that go to
that specific code in Column B. Then I have Column C which has a selection of
1400 of those codes from Column A. Is there a way that I can take the Column
C codes and compare them to those in Column A and if there is a match put
just those that match on a different on a different worksheet - giving me a
new list of those 1400 codes with the correlating prices?

Example:
A B C
0400T 275.00 0500T
0500T 6.50 24900
12000 44.00 66000
24900 339.00 H0876
66000 112.00
99823 10.00
H0876 13.85

After run would have:
A B
0500T 6.50
24900 339.00
66000 112.00
H0876 13.85


--

Dave Peterson


All times are GMT +1. The time now is 08:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com