+ Reply to Thread
Results 1 to 2 of 2

Issue with matching fields script

  1. #1
    Registered User
    Join Date
    07-12-2012
    Location
    NY
    MS-Off Ver
    Excel 2003
    Posts
    5

    Issue with matching fields script

    Okay I will try and explain this simply then post my code . I have a work book with a large set of data with Company Name , Address , zip Columns the data in these rows can have duplicates *which we dont want to remove * and it can not be sorted again this is for clerical reasons. I have a script that takes a New work book and compares that work books Name Address and Zip columns against the columns in the first work book it then colors matching cells useing differnt colors depending on the column and then writes the ENTIRE row where a matching cell is found to a Results sheet in work book 1 * There is to much senstive data for me to post almost any of these work books if more explantion is needed let me know* Here is my issue things work almost 100% perfect the script pulls the sheet from workbook 2 in to work book 1 so as that work book one looks like this "Database sheet" "Results sheet" "Compare sheet *this sheet is from workbook 2 and is imported" matching cells are colored and there rows are written to the Results sheet EXCEPT for some reason my code skips any duplicate results as example we might have company IBM 10 DOG LANE twice it will skip writeing this out COMPLETELY so it wont write out IBM 10 DOG LANE at all in the results sheet it will skip it.

    Just so its clear I dont want my code to care if there is duplicates it should write out the row if a match is found in any cell right now if there are duplicate matchs it completely ignores all the data , this does not mean if there is 3 copys of the same row it rights out one copy it currently doesnt right out ANY data that is duplicated.
    Here is my code

    Please Login or Register  to view this content.
    Last edited by Leith Ross; 07-17-2012 at 12:16 PM.

  2. #2
    Registered User
    Join Date
    07-12-2012
    Location
    NY
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Issue with matching fields script

    Fixed I apprecaite any help any one was willing to offer but I found the problem and fixed it I was checking for just ONE match if even two was found it skipped it , Changed the code to use a flag for a found match instead of actualy checking for just one match.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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