+ Reply to Thread
Results 1 to 16 of 16

Matching

  1. #1
    Forum Contributor
    Join Date
    07-28-2005
    Posts
    151

    Matching

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

    Thanks for the help
    Attached Files Attached Files

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

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

    HTH
    Jean-Guy

  3. #3
    Forum Contributor
    Join Date
    07-28-2005
    Posts
    151
    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

  4. #4
    pinmaster
    Guest
    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

  5. #5
    Forum Contributor
    Join Date
    07-28-2005
    Posts
    151
    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.

  6. #6
    Forum Contributor
    Join Date
    07-28-2005
    Posts
    151
    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 column and the exceptions column are both formatted as text.

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

  7. #7
    pinmaster
    Guest
    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

  8. #8
    pinmaster
    Guest
    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

  9. #9
    Forum Contributor
    Join Date
    07-28-2005
    Posts
    151
    Thanks for the help, but it still does not work. I don't know what too 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 statistics formulas (e.g. mean median etc) that are linked to the prices on sheet 1. But i don't see why this should matter. I am trying to delete the exceptions so that the descriptive statistics change.

    Chris

  10. #10
    pinmaster
    Guest
    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

  11. #11
    Forum Contributor
    Join Date
    07-28-2005
    Posts
    151
    Here is a short example. Note how the 3 is missing.
    Attached Files Attached Files

  12. #12
    pinmaster
    Guest
    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

  13. #13
    Forum Contributor
    Join Date
    03-12-2004
    Posts
    329
    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.

  14. #14
    Forum Contributor
    Join Date
    07-28-2005
    Posts
    151
    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?

  15. #15
    Forum Contributor
    Join Date
    03-12-2004
    Posts
    329
    Quote Originally Posted by 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?

    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.

  16. #16
    pinmaster
    Guest
    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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1