+ Reply to Thread
Results 1 to 8 of 8

Comparing Values in 2 columns

  1. #1
    Registered User
    Join Date
    12-01-2004
    Posts
    70

    Comparing Values in 2 columns

    Hi all

    I am trying to compare values in 2 columns and the values are same but it is retuning false
    Tried Trim function, still doesn't work, any idea how to get this one working, appreciate your help

    Thank You

  2. #2
    Forum Contributor
    Join Date
    04-07-2009
    Location
    Rowley
    MS-Off Ver
    Excel 2007
    Posts
    326

    Re: Comparing Values in 2 columns

    Try the CLEAN() function or use both CLEAN & TRIM

    =CLEAN(TRIM(A1))

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,058

    Re: Comparing Values in 2 columns

    That doesn't work for CHAR 160, I think...

    =SUBSTITUTE(clean(A1),CHAR(160),"")

    Failing that...Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? Please don't attach a picture of one (no-one will want to re-type all your stuff before starting).

    1. Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential information is removed first!!

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Forum Contributor
    Join Date
    04-07-2009
    Location
    Rowley
    MS-Off Ver
    Excel 2007
    Posts
    326

    Re: Comparing Values in 2 columns

    It also does not work for CHAR 127 so try this also:

    =SUBSTITUTE(A1,CHAR(127),"")

  5. #5
    Valued Forum Contributor jtakw's Avatar
    Join Date
    05-05-2018
    Location
    CA, USA
    MS-Off Ver
    2016
    Posts
    668

    Re: Comparing Values in 2 columns

    Hi,

    Since CHAR 127 is "Visible" and OP would've noticed it, I tend to doubt that's the culprit, it's most likely CHAR 160...

    Depending on OP's data, there're at least a couple of ways to "clean up" the data, so a sample would help.

  6. #6
    Forum Contributor
    Join Date
    04-07-2009
    Location
    Rowley
    MS-Off Ver
    Excel 2007
    Posts
    326

    Re: Comparing Values in 2 columns

    You are, of course, correct,
    CHAR 127 displays as a small square with a question mark inside,
    but since it is the only other character that CLEAN() does not work on, figured it was worth the mention.

  7. #7
    Forum Contributor
    Join Date
    04-07-2009
    Location
    Rowley
    MS-Off Ver
    Excel 2007
    Posts
    326

    Re: Comparing Values in 2 columns

    Another way to display the Non-printable characters is to switch your Font to Terminal
    CHAR 160 will now display as lowers case A with an accent mark
    CHAR 127 will now display as a kind of triangle

  8. #8
    Forum Contributor
    Join Date
    04-07-2009
    Location
    Rowley
    MS-Off Ver
    Excel 2007
    Posts
    326

    Re: Comparing Values in 2 columns

    Just noticed that Win XP and Win 7 display the CHAR 127 character differently.

    Win XP as a box with a question mark
    Win 7 as a perpendicular bar

+ 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. [SOLVED] Matching values in two columns, then comparing values in adjacent cells
    By crfcaio in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-03-2017, 07:40 PM
  2. Comparing two columns' values
    By Talamon in forum Excel General
    Replies: 1
    Last Post: 06-26-2014, 05:26 PM
  3. Replies: 3
    Last Post: 04-23-2014, 05:14 PM
  4. [SOLVED] Comparing values in columns
    By Knocknaboula in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-04-2013, 11:47 AM
  5. Comparing Values Between Columns
    By Kleo in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-25-2012, 04:00 PM
  6. Comparing values in two columns
    By DCS in forum Excel General
    Replies: 2
    Last Post: 10-13-2006, 03:41 AM
  7. [SOLVED] Comparing values in two columns and displaying missing values in n
    By cpetta in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-04-2005, 11:29 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