+ Reply to Thread
Results 1 to 4 of 4

VBA Code to compare/match multiple columns in one sheet with multiple columns in another

  1. #1
    Registered User
    Join Date
    06-20-2016
    Location
    United States
    MS-Off Ver
    2010
    Posts
    2

    VBA Code to compare/match multiple columns in one sheet with multiple columns in another

    Hello,

    I have two sheets of data. One sheet has 12 columns, lets call it 'Outsiders'. The other sheet has 2 columns, we'll call that sheet 'Insiders'.

    I want to compare the 2 columns of Insiders against the 12 columns of Outsiders and return a yes or no result in the third column of the Insiders sheet.

    The Insiders sheet columns will have first name, last name or just Business name in the first column with a blank second column in those respective rows.

    All the data is text and non-numeric. The idea is to check if an individual name/business name in the Insiders sheet shows up in any column in the Outsiders sheet and return a yes or no value in the Insiders sheet.

    I am having some trouble trying to figure out the logic and code for how to do this. Any suggestions would be very much appreciative. Thanks.

  2. #2
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: VBA Code to compare/match multiple columns in one sheet with multiple columns in anoth

    Please Login or Register  to view this content.
    I'm interested in starting a career working with VBA, if anyone knows of any opportunities!

  3. #3
    Registered User
    Join Date
    06-20-2016
    Location
    United States
    MS-Off Ver
    2010
    Posts
    2

    Re: VBA Code to compare/match multiple columns in one sheet with multiple columns in anoth

    This almost worked flawlessly. However, when I run the code, say there is a value (name) 'Jane' in the insiders list. The code returns yes, for values with 'jane' inside of them such as Janette. Is their anyway to have it return yes only if the exact name is matched not just the first couple of characters?
    Would it also be possible to return the cell or cells in the insider sheet of the matches from the outsider sheet. For example, column 3 of the insider sheet would read 'yes' and then 'A,4'. Thanks.

  4. #4
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: VBA Code to compare/match multiple columns in one sheet with multiple columns in anoth

    Yes to both questions:

    Please Login or Register  to view this content.

+ 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 multiple columns for match then give MIN
    By em1335 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-01-2016, 03:43 PM
  2. Formula to Compare 2 Different Columns on a single Row Multiple Columns
    By dndgeez in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-05-2015, 04:11 AM
  3. Macro to Compare two columns and publish sheet name in case columns dont match
    By adaws in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-06-2014, 01:21 PM
  4. Replies: 0
    Last Post: 10-07-2013, 10:24 AM
  5. Replies: 5
    Last Post: 08-27-2013, 12:46 AM
  6. Replies: 1
    Last Post: 10-04-2012, 02:31 PM
  7. How to Match values from multiple Columns for Inventory sheet
    By NEOJIM in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-12-2012, 05:50 AM

Tags for this Thread

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