Compare Two Columns

N

ng6971

Hi All,

I have 4 data columns. Column A has 150 data cells, Column B, C and D has
450 data cells.

I would like to compare only Column A to Column B and if there is a match,
put the matching results in Column F - Column G - Column H - Column I.

Situation:
A B C D
1 3 x y
2 2 x y
3 0 x y
4 1 x y


Results needed:
F G H I
1 1 x y
2 2 x y
3 3 x y


Any help would be great!

Thanks in Advance.
 
Joined
Sep 20, 2009
Messages
47
Reaction score
2
this is a non-macro solution. I am not an expert. Better solution may be available

copy the data in column A,B,C,D and paste into F1,G1,H1,I1
now in G1 type this formula

=INDEX($B$1:$B$4,MATCH(A1,$B$1:$B$4,0)*1)

you can delete the error row.
confirm if it is ok
 
N

ng6971

Hi Smartin,

It Works perfectly. Need a VBA code also for entire columns not the range as
mentioned eariler.

Thanks & Warm Regards

NG
 
Joined
Sep 20, 2009
Messages
47
Reaction score
2
will not be enough if you just substitute B4 by B1000 or B10000 whatever maximum rows you can envisage

you can even try $B:$B.

do you stisll need a macro
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top