# Microsoft Office Application Help - Excel Help forum > Excel Formulas & Functions >  >  How to match values in one column to values in another?

## trib

I have the following question:

I have about 2000 records in Column 1 (a code consisting of letters and numbers). In Column 2 I have about 1500 records. All of the records in Column 2 are contained in Column 1. However, since about 500 are missing I cannot sort the equal values next to one another - 

How to make it so that Excel matches the values in Column 2 next to the same values in Column 1?

I have attached a word file in order to show a sample of what I need.

----------


## Max

Assuming Series 1 starts in A2 down, Series 2 starts in B2 down

Put in C2:
=IF(ISNUMBER(MATCH(A2,B:B,0)),A2,"")
Copy C2 down to the last row of data in col A

Col C will return the required results
If desired, just cut out col C and paste special as values to overwrite col B
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"trib" wrote:
>
> I have the following question:
>
> I have about 2000 records in Column 1 (a code consisting of letters and
> numbers). In Column 2 I have about 1500 records. All of the records in
> Column 2 are contained in Column 1. However, since about 500 are
> missing I cannot sort the equal values next to one another -
>
> How to make it so that Excel matches the values in Column 2 next to the
> same values in Column 1?
>
> I have attached a word file in order to show a sample of what I need.
>
>
> +-------------------------------------------------------------------+
> |Filename: Question.doc                                             |
> |Download: http://www.excelforum.com/attachment.php?postid=5077     |
> +-------------------------------------------------------------------+
>
> --
> trib
> ------------------------------------------------------------------------
> trib's Profile: http://www.excelforum.com/member.php...o&userid=36682
> View this thread: http://www.excelforum.com/showthread...hreadid=564176
>
>

----------


## trib

Thanks a lot!

----------


## Max

"trib" wrote:
> Thanks a lot!

You're welcome !
Thanks for feeding back ..
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---

----------


## kumar585

Hi,

I have a very similar problem, but a bit more complicated.

I have column A with a set for first names and last names together, and column B with set of first, middle and last names. Can some one please help me in comparing these two?

What I am basically looking to do here is match the first and last words of each cell in column A with first and last words of cells in column B.

Please help me in this, I have been going mad off late trying to do this.  :Frown:

----------


## johnjohns

Please read the forum rules and start your own thread.

----------


## HJT88

WOW! Thanks Max. That was so easy and gave me exactly the result I needed!

----------


## PvtBeaker

Have a simular but more difficult problem. Trying to match a designated value from column "X" with the names in column 1. :Confused:

----------

