+ Reply to Thread
Results 1 to 2 of 2

Comparing two data sets: formula? ... or do I need a macro?

Hybrid View

  1. #1
    Registered User
    Join Date
    03-27-2012
    Location
    Tampa, FL
    MS-Off Ver
    Excel for M365
    Posts
    54

    Smile Comparing two data sets: formula? ... or do I need a macro?

    Hi everyone,

    I am in the process of comparing similar data from two different sources (ergo they are not formatted exactly the same). Please see attached sample document. Customer name from "data source #1" does not always match 1 to 1 customer name from "data source #2". As you can see on "data source #2", I'm currently showing the following formula in column B: =VLOOKUP(A3,'Data source 1'!$A:$B,2,FALSE). Obviously a VLOOKUP formula is not the way to go due to the fact that over half the results need manual checking.

    I thought about doing text to columns on "data source #1" to remove the embedded customer number from the name; however this creates the reverse problem because some of the customer names on "data source #2" DO contain customer number (and need to continue to do so).

    Any ideas for me before I start manually comparing? As you can see, I've sent 30 samples from the letter "A" so there may be a lot to check. Would prefer to use a formula to accomplish end goal, but not opposed to writing a macro to accomplish.

    Ultimate goal here is this: if customer exists on "data source #1" and "data source #2" want to populate a 1 in column B on "data source #2"; if customer exists on "data source #2" and does NOT exist on "data source #1" want to populate nothing (i.e. blank cell) in column B on "data source #2".

    Also, if there is a way to somehow "list" those that exist on "data source #1", but do not on "data source #2", that would be helpful. Though I suppose I can do the reverse of whatever solution I come up with for the "data source #2" tab above.

    Thanks in advance - appreciate always learning
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Comparing two data sets: formula? ... or do I need a macro?

    Using wild cards will get a lot closer...
    =VLOOKUP("*"&A3&"*",'Data source 1'!$A:$B,2,FALSE)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. Comparing two sets of data
    By redrasta in forum Excel General
    Replies: 8
    Last Post: 02-16-2012, 08:56 AM
  2. Comparing two sets of data
    By indimonk in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-12-2011, 04:03 AM
  3. Comparing 2 Sets of Data
    By gregburbidge in forum Excel General
    Replies: 13
    Last Post: 11-02-2009, 08:12 PM
  4. Comparing two sets of data
    By LEEP2008 in forum Excel General
    Replies: 7
    Last Post: 10-08-2009, 03:38 PM
  5. Comparing two sets of data
    By sheargraphix in forum Excel General
    Replies: 2
    Last Post: 06-26-2007, 01:38 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