Matching

C

cj21

Could people see my matching problem posted before. I have don an
example to show my problem. It is attached.

Thanks for the help


+-------------------------------------------------------------------+
|Filename: Book1.zip |
|Download: http://www.excelforum.com/attachment.php?postid=4330 |
+-------------------------------------------------------------------+
 
P

pinmaster

Not sure what you're trying to do but I noticed that your formulae ar
offset by 1...meaning that the formula in B2 is trying to match A1 th
formula in B3 A2 and so on. If your trying to get rid of the #N/A the
use:

=IF(ISNA(MATCH(A2,$C$2:$C$7,0)),"",MATCH(A2,$C$2:$C$7,0))

HTH
Jean-Gu
 
C

cj21

You are right i have made an error there-it should be A2 as opposed to
A1.

However, for my real data set the match does not work-for some values,
even though the format is correct. I can't work out why. On an exactly
the same data set it works. Unfortunately the file is too big to post.

Chris
 
P

pinmaster

The way your formula is set up it will only return a value for an exact
match.

try:

=MATCH(A2,$C$2:$C$7,1)

HTH
Jean-Guy
 
C

cj21

But the problem is i do want a perfect match.
I have 2 lists:
Product Exception
01238451 01238451
01323472 01355763
01355763
02545364
02454776

The product list is greater than the exceptions list. I want to use the
match formula, to show me where the exceptions are, then i can delete
them (made easier by using the filter). I do not know why the match
formal does not work for all of the exceptions, it does for some.
 
C

cj21

I think i've found where the problem lies. My product list is 5000 rows
the first 700 product codes begin with a zero, thus the product colum
and the exceptions column are both formatted as text.

The match formula works for the first 700 rows (products beginning wit
a 0) and then stops- i don't know why? I have tried changing the forma
but that does not work
 
P

pinmaster

Don't know if this will help but try:

assuming all the exceptions codes are 8 characters long
=MATCH(TEXT(A2,"00000000"),$C$2:$C$7,0)

HTH
Jean-Guy
 
P

pinmaster

Or maybe:

=MATCH(TEXT(A2,"00000000"),TEXT($C$2:$C$7,"00000000"),0)
this is an array formula so enter using Ctrl+Shift+Enter

Regards
Jean-Guy
 
C

cj21

Thanks for the help, but it still does not work. I don't know what to
do!

As well as the Product column there are also other columns on sheet 1
one of which is price. On another sheet i have descriptive statistic
formulas (e.g. mean median etc) that are linked to the prices on shee
1. But i don't see why this should matter. I am trying to delete th
exceptions so that the descriptive statistics change.

Chri
 
P

pinmaster

This may not be an option but you could try transforming all your codes
in numbers.

here's how, type the number 1 in an empty cell, copy that cell next
select all your codes then Edit/Paste Special and select "Multiply" hit
Ok.

If that doesn't work then I suggest re-posting with sample data that is
not working, I'm sure some of the MVP's out there could help you.

Regards
Jean-Guy
 
P

pinmaster

In your sample data I was able to get a result by doing either of these
2 things.

1 - by using this array formula
=MATCH(TEXT(A2,"00000000"),TEXT($C$2:$C$5,"00000000"),0)
when entering an array formula you can not just hit enter, you need to
hold down the Ctrl+Shift keys and then hit Enter. If done right curly
braces {} will appear at both ends of the formula

2 - by using the last suggestion I gave you....putting 1 in a blank
cell, copying it, then selecting the codes in both columns and going to
Edit/Paste Special and selecting "Multiply".

So if your data is constistent with the sample you gave then either of
these 2 should work. If you try no. 2 then your original match formula
should work.


Hope this helps!
Jean-Guy
 
M

Morrigan

Highlight the product codes -> Data -> Text to Columns -> Finish
Highlight the exception codes -> Data -> Text to columns -> Finish

It fixed your sample, try it on your master sheet.


Hope it helps.
 
C

cj21

This has worked very well (the text to columns approach, thankyou.
However when i do this, the zeros are knocked off my product codes that
begin with 01. Is there any way too stop this?
 
M

Morrigan

cj21 said:
This has worked very well (the text to columns approach, thankyou.
However when i do this, the zeros are knocked off my product codes that
begin with 01. Is there any way too stop this?


Using the text-to-columns approach, I am not sure how to prevent the
leading zero from disappearing in your situation. There is always
someone else on this forum who can give better suggestions.

Depending on your codes, maybe you can use autofilter to filter out all
the codes that contains a number > 10 and modify the leftover.
 
P

pinmaster

If all you codes are all the same lenght (8 characters) then maybe you
could use a custom cell format of 00000000

HTH
Jean-Guy
 

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