+ Reply to Thread
Results 1 to 6 of 6

Tricky: Macro to compare cells of two sheets, no exact matches though

  1. #1
    Forum Contributor
    Join Date
    12-05-2008
    Location
    Germany
    MS-Off Ver
    365
    Posts
    568

    Tricky: Macro to compare cells of two sheets, no exact matches though

    Dear All,


    please have a look at the attached Workbook.

    The task is to compare the contents of the first sheet "Ship" column B with the contents of the second sheet "Data" also column B. If it finds any of the words on the second sheet, it should pull the amount over to the first sheet and lastly, delete that entire row in sheet "Data"

    I have manually entered the amount of 34,98 into the "Ship" sheet so you can see what needs to be accomplished. The tricky thing is, that there will almost never exact matches.

    I hope anybody can help me with this.

    Felix
    Last edited by 6StringJazzer; 11-15-2014 at 05:41 PM. Reason: attachment with private data removed, see subsequent post for sanitized version

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

    Re: Tricky: Macro to compare cells of two sheets, no exact matches though

    Your data in Ship column B is never going to match with Data Col B as it contains the full name and address while Data is just names. Are you wanting just the names checking?

  3. #3
    Forum Contributor
    Join Date
    12-05-2008
    Location
    Germany
    MS-Off Ver
    365
    Posts
    568

    Re: Tricky: Macro to compare cells of two sheets, no exact matches though

    yes, just the names. Comments in Ship can be ignored

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: Tricky: Macro to compare cells of two sheets, no exact matches though

    elgato74, we do not permit posting of personal data. Your file has personal data in the comments. I have removed your attachment and reattached it without the comments.
    Attached Files Attached Files
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Tricky: Macro to compare cells of two sheets, no exact matches though

    Hi, Felix,

    this is the best example that you would need to normalize your data. Except having upper case as well as proper case names (can be handled with UCase or LCase) you have single names (what should they compare to: First or Last), firstname blank lastname, firstname comma blank lastname, firstname comma lastname, lastname blank firstname, lastname comma firstname, lastname comma blan firstname. This is no job for a programmer to help but for somebody who will make the data workable and the ask again.

    And I don愒 think any title like Dr. should be part of a name.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  6. #6
    Forum Contributor
    Join Date
    12-05-2008
    Location
    Germany
    MS-Off Ver
    365
    Posts
    568

    Re: Tricky: Macro to compare cells of two sheets, no exact matches though

    Hi Holger,

    I was fearing that. To normalize 1,000+ rows is a bit of a pain. I was hoping that a search could do the job ... let's say 4 letters match - and boom that is a hit then

    Felix

+ 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] Find Exact matches on 2 sheets and export results to 3rd Sheet
    By gadrummer65 in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 05-27-2014, 01:41 PM
  2. [SOLVED] Compare two sheets to find matches?
    By BlueMoonNJ in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-14-2013, 04:16 PM
  3. Replies: 0
    Last Post: 08-11-2012, 03:25 PM
  4. Formula to compare 2 colums looking for exact matches
    By Raisedwell in forum Excel General
    Replies: 7
    Last Post: 08-25-2010, 04:57 PM
  5. Excel 2007 : Exact Text Matches for multiple cells.
    By Canus in forum Excel General
    Replies: 3
    Last Post: 07-26-2010, 08:55 AM

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