+ Reply to Thread
Results 1 to 6 of 6

Finding Possible Mismatch between columns

  1. #1
    Registered User
    Join Date
    02-26-2015
    Location
    Bangalore,India
    MS-Off Ver
    2010
    Posts
    3

    Finding Possible Mismatch between columns

    So I have two columns of data, say A and C. I did a VLookUp and Highlighted the mismatches in column A(yellow colour). I now have to add a comment to the highlighted cell in A, that gives the mismatch name as present in column C. For example if the mismatch highlighted in column A is "Joel", and the same is written in column C as "Joell" then the comment over the cell in column A must read "In column C as: Joell". I have tried and searched a lot, but to no avail. Is there anyone who could give me a VBA code to do the same?

    NOTE: Column A and column C are ordered differently and have different number of cells.
    Last edited by ankituc; 09-29-2015 at 02:18 AM.

  2. #2
    Forum Contributor Gregor y's Avatar
    Join Date
    10-24-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2010 32-Bit
    Posts
    280

    Re: Finding Possible Mismatch between columns

    I'm having a hard time picturing what you're asking. Since as far as Excel would care "Joel" would not only be a mismatch to "Joell", but also to "Sam", "Gorge", "Bob", ... and pretty much anything other than "Joel".

    that asside, the VBA to update cell comments would look something like this:
    Please Login or Register  to view this content.
    If it'd make you feel better using my answer because of my street cred, then you can go ahead and click Add Reputation below to improve it.

  3. #3
    Registered User
    Join Date
    02-26-2015
    Location
    Bangalore,India
    MS-Off Ver
    2010
    Posts
    3

    Re: Finding Possible Mismatch between columns

    Hey Gregor,
    I understand that anything would be a mismatch. But i would like the comment to show the closest mismatch if possible? Can you think of a code that could do that?

  4. #4
    Registered User
    Join Date
    02-26-2015
    Location
    Bangalore,India
    MS-Off Ver
    2010
    Posts
    3

    Re: Finding Possible Mismatch between columns

    Quote Originally Posted by Gregor y View Post
    I'm having a hard time picturing what you're asking. Since as far as Excel would care "Joel" would not only be a mismatch to "Joell", but also to "Sam", "Gorge", "Bob", ... and pretty much anything other than "Joel".

    that asside, the VBA to update cell comments would look something like this:
    Please Login or Register  to view this content.

    Hey Gregor Y,
    I understand what you're trying to stay. All those are mismatches i agree. But I'm looking to show the closest mismatch in the comment. I hope this makes it a little more clear as to what I'm trying to achieve. And I really hope someone can help me with the code. I am unable to find help anywhere else.

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Finding Possible Mismatch between columns

    Does this help?

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor Gregor y's Avatar
    Join Date
    10-24-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2010 32-Bit
    Posts
    280

    Re: Finding Possible Mismatch between columns

    I believe you are going to have a hard time nailing down what “closest” really means when you’re talking about misspellings.

    For example is "Joell" or "Jole" a closer match to "Joel"?

    Two possible avenues for you to look into if you’re the programmer type are:
    However these two are so far removed from out of the box Excel that you’re going to have quite a bit of heavy lifting yet to do… and also likely to end with a O(N2) algorithm

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Finding the max and sum of certain columns.
    By Skalv in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-25-2014, 02:41 PM
  2. [SOLVED] Runtime error 13 type mismatch when inserting columns
    By ChrisAdl in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-09-2013, 11:27 PM
  3. [SOLVED] Type Mismatch when assigning data from ranges (columns) to arrays
    By seigna in forum Excel Programming / VBA / Macros
    Replies: 32
    Last Post: 05-07-2013, 07:40 AM
  4. Difficulty in formula using 3 Columns as Variable inputs, type mismatch
    By sgonzalez90 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-30-2013, 12:54 PM
  5. [SOLVED] "Run-time error '13': Type mismatch" when deleteing multiple cells from targeted columns
    By mweickdival in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-26-2012, 01:09 PM
  6. Replies: 1
    Last Post: 04-09-2012, 02:58 PM
  7. Replies: 3
    Last Post: 03-02-2007, 07:13 AM
  8. using functions to compare multiple columns for mismatch of cells
    By MDIAZ451 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-12-2006, 10:50 PM

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