+ Reply to Thread
Results 1 to 5 of 5

formula to compare text in 2 columns

  1. #1
    Registered User
    Join Date
    11-23-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    56

    formula to compare text in 2 columns

    How do I write an IF formula to compare the text in one column to another and if they are the same then the answer is YES. If they are not the same then the answer is NO.

    EXAMPLE:
    column A Column B column C
    123 Main St 1234 Main St NO
    855 Boyer Lane 855 Boyer Lane YES

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,833

    Re: formula to compare text in 2 columns

    Please Login or Register  to view this content.
    If someone has helped you then please add to their Reputation

  3. #3
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    2016
    Posts
    3,836

    Re: formula to compare text in 2 columns

    =IF(A1=B1,"YES","No") this will work perfectly but sometimes we need exact comparison than we can use =IF(EXACT(A1,B1),"Yes","No")
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    or

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  4. #4
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,833

    Re: formula to compare text in 2 columns

    You may also want to incorporate TRIM in there as a rogue space on the start/end is notorious for failing comparisons.

    eg
    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-21-2012
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: formula to compare text in 2 columns

    In general the easiest way here is =A1=B1 It will display TRUE or FALSE

+ 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. Compare text columns and return a value based on text
    By phxmafia in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-13-2014, 10:50 AM
  2. Replies: 2
    Last Post: 02-05-2014, 07:30 PM
  3. Replies: 6
    Last Post: 02-28-2013, 11:27 AM
  4. Compare two columns of text
    By RKP in forum Excel General
    Replies: 3
    Last Post: 05-22-2012, 11:19 AM
  5. Compare text in two different columns in Excel then print text
    By lllr in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-05-2010, 12:28 PM
  6. Compare Text in 2 columns
    By salemh in forum Excel General
    Replies: 1
    Last Post: 10-07-2008, 02:08 PM
  7. Compare text in two columns
    By rmichaels55 in forum Excel General
    Replies: 5
    Last Post: 06-24-2008, 01:56 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