[RESOLVED] Excel 2010 : String comparision : values containing non-uk characters-VBForums
Results 1 to 6 of 6

Thread: [RESOLVED] Excel 2010 : String comparision : values containing non-uk characters

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2012
    Posts
    90

    Resolved [RESOLVED] Excel 2010 : String comparision : values containing non-uk characters

    Hi there,

    I need to compare 2 sets of data and flag up where there is either a direct match or a close match. For example, I have a name and a city value in each data set;

    Data Set 1:
    Column A Column B
    Aurélie Marsh Paris Cedex 02
    Françoise Butt Lille Cedex
    Andy Pitt Lille

    Data Set 2:
    Column A Column B
    Aurelie Marsh Paris Cedex
    Francoise Butt Lille
    Barry Hurthly Paris

    I would expect the Aurelie Marsh and Francoise Butt records to be flagged as a match even though the name are written with the extended character and the city is having almost the same value.

    Is this possible? I don't want to take the data into Access unless I really have to, and I would like to avoid substituting the characters from the extended set.

    Thanks for anything you can offer.

  2. #2
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Excel Hell!
    Posts
    4,951

    Re: Excel 2010 : String comparision : values containing non-uk characters

    You could replace the special characters with normal characters then match...
    Is it code you are using? And will it need to account for the data being on a different row (yet still match)?

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jun 2012
    Posts
    90

    Re: Excel 2010 : String comparision : values containing non-uk characters

    Thanks for your reply.

    yes, it is code that I would like. There is a 'pot' of data with 50k row and a list of records that I need to check one-by-one to see if the value appears in the 'pot'.

  4. #4
    PowerPoster
    Join Date
    Dec 2004
    Posts
    19,803

    Re: Excel 2010 : String comparision : values containing non-uk characters

    looks like you will need some lookup table to compare the non matching characters
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  5. #5
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Excel Hell!
    Posts
    4,951

    Re: Excel 2010 : String comparision : values containing non-uk characters

    Ok

    So your 50k pot, could have a second field that holds normal characters. Then you can perform the matches you need from your search record(s) against the pots 'fixed' data without amending the original data.


    How are you doing your code for the 'almost' matches?

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Jun 2012
    Posts
    90

    Re: Excel 2010 : String comparision : values containing non-uk characters

    Sorry to reply late on this. Been away but wanted to loop back to thanks those who posted a reply or comment. The project went away to the burning issue of the day is no longer keeping me awake at night

    Many thanks to WestConn1 and Ecniv.

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.