PDA

View Full Version : What is wrong with my match function?



OdiN
02-19-2008, 03:04 PM
Match will not work...at all!

I don't understand!

Okay I have a spreadsheet with a bunch of numbers. I need to find which matches in one list of numbers to another list.

For example:

Column A Column B

012345 054321
054321 012345
0456676 099999
099999 0456676
8788333 0423233


Okay in column C, I put this code:

=Match(B1, $A$1:$A$5, 0)

This should return some matching rows with this data. I can see with my bare eyes a couple that match. But when I do this - it doesn't find any matches.

HOWEVER - If I manually type these numbers in and do the match formula exactly the same, it works perfectly. WHY? This isn't feasable as there are a few hundred numbers and I'm not going to retype them one by one.

I have checked the format to make sure they are identical. I have tried having both lists sorted ascending. I started a whole new workbook and did a copy/paste special and picked "values" and pasted the numbers into a new workbook, did the match, and it STILL didn't work!

What gives? What am I missing?

Bob Phillips
02-19-2008, 05:22 PM
Maybe extra spaces

=MATCH(TRIM(B1),$A$1:$A$5,0)

mikerickson
02-19-2008, 11:23 PM
Are rows A or B formatted as text? If so Text to Columns is one way to quickly convert them to General format.