+ Reply to Thread
Results 1 to 2 of 2

Compare Text in 2 columns

  1. #1
    Registered User
    Join Date

    Compare Text in 2 columns


    I have played around with this for sometime and decided at the end to post a thread in hopes someone can give me an easy and quick way of doing this.

    I have 2 columns (A&B) that i want to compare text data and return a boolean value. One column contains the reference material (Col. A) that i want to cross reference another column (B) to make sure that the contents in column B are already covered in column A.

    Here is the difficult part... i dont want to compare cell by cell, because my column A has cells that contain more than one piece of data, but are on separate lines within the cell itself (using Alt+enter)

    (e.g. of how one cell could look like:




    ... and so on)

    My column B has each value in a separate cell (and no i cant sort the data or separate the contents of column A to have each cell contain one piece of data for other dependency issues)

    My question is how can I make excel go through each cell in Column B and just searching for an exact match in column A (remember that the cells may contain more than one value and im only interested in a one string match not the whole cell) and return a boolean value whether there was a match or not and also return the row number of where the match was found in column A.

    Your help would be greatly appreciated.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)

    Welcome to the forum. Please read the forum rules below and then add the link to the other excel forum

    VBA Noob

    Credo Elvem ipsum etian vivere
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

+ 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. Text to Columns but using a formula
    By kmham in forum Excel General
    Replies: 10
    Last Post: 03-20-2011, 03:22 AM
  2. Compare two columns and add third column based on matches
    By sa02000 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-30-2008, 10:06 AM
  3. Compare text in two columns
    By rmichaels55 in forum Excel General
    Replies: 5
    Last Post: 06-24-2008, 01:56 PM
  4. Text to columns - First Instance of =
    By hyyfte in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-06-2007, 12:50 PM
  5. Joining text in columns
    By yorkshirekid in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-23-2006, 02:18 PM


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