+ Reply to Thread
Results 1 to 12 of 12

Large Database Need to Compare Two "Code "Columns in New and Old File to Be True or False

  1. #1
    Forum Contributor
    Join Date
    03-06-2015
    Location
    houston, tx
    MS-Off Ver
    MS 365
    Posts
    513

    Large Database Need to Compare Two "Code "Columns in New and Old File to Be True or False

    I have over 1 million rows of data that I need to determine if Column B (Code) and Column G (Code) match when using unique numbers found in Column A & F. If A&F match, then Column B & G should match. If yes, then True, if no, then False.

  2. #2
    Forum Contributor
    Join Date
    03-06-2015
    Location
    houston, tx
    MS-Off Ver
    MS 365
    Posts
    513

    Re: Large Database Need to Compare Two "Code "Columns in New and Old File to Be True or Fa

    I only put in 30 rows in the attached file. So no worries about a huge attached file.

  3. #3
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,602

    Re: Large Database Need to Compare Two "Code "Columns in New and Old File to Be True or Fa

    How about
    Please Login or Register  to view this content.
    In your test file the numbers in col F are stored as text, these will need to be converted to numbers for this to work.
    This will put the word False into col I if it's not a match

  4. #4
    Forum Contributor
    Join Date
    03-06-2015
    Location
    houston, tx
    MS-Off Ver
    MS 365
    Posts
    513

    Re: Large Database Need to Compare Two "Code "Columns in New and Old File to Be True or Fa

    I am not knowleable on how to use code. Where do I put the code?

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,602

    Re: Large Database Need to Compare Two "Code "Columns in New and Old File to Be True or Fa

    I've added the code for you

  6. #6
    Forum Contributor
    Join Date
    07-06-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2016
    Posts
    192

    Re: Large Database Need to Compare Two "Code "Columns in New and Old File to Be True or Fa

    convert your column F to store as number first.
    then try this
    =IFERROR(IF(AND(MATCH(F2,A:A,0),MATCH(G2,B:B,0)),TRUE),FALSE)

  7. #7
    Forum Contributor
    Join Date
    03-06-2015
    Location
    houston, tx
    MS-Off Ver
    MS 365
    Posts
    513

    Re: Large Database Need to Compare Two "Code "Columns in New and Old File to Be True or Fa

    I am unable to figure out how to run the code.

    Also on the finalazy, it returns True. Incident Numbers in A and F could be different with most the same and in order.

  8. #8
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Large Database Need to Compare Two "Code "Columns in New and Old File to Be True or Fa

    you can try with PowerQuery (because Windows 7 Pro is not an Excel version you'll need PoqwerQuery add-in for Excel 2010 or 2013, or Excel 2016 with PowerQuery built-in)

  9. #9
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,602

    Re: Large Database Need to Compare Two "Code "Columns in New and Old File to Be True or Fa

    I've added a button to run the macro.
    You'll need to ensure that macros are enabled

  10. #10
    Forum Contributor
    Join Date
    03-06-2015
    Location
    houston, tx
    MS-Off Ver
    MS 365
    Posts
    513

    Re: Large Database Need to Compare Two "Code "Columns in New and Old File to Be True or Fa

    How do I add this to my large database?

  11. #11
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,602

    Re: Large Database Need to Compare Two "Code "Columns in New and Old File to Be True or Fa

    Have a look at this article https://support.office.com/en-us/art...7-a71f7e626de0

    Then you can either add a shape & assign the macro to it. or press Alt F8, select the macro 7 click run

  12. #12
    Forum Contributor
    Join Date
    07-06-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2016
    Posts
    192

    Re: Large Database Need to Compare Two "Code "Columns in New and Old File to Be True or Fa

    Quote Originally Posted by pick44 View Post
    I am unable to figure out how to run the code.

    Also on the finalazy, it returns True. Incident Numbers in A and F could be different with most the same and in order.
    ah my mistake. didn't try it out.

    Should be
    =IFERROR(IF(INDEX(B:B,MATCH(F2,A:A,0))=INDEX(G:G,MATCH(F2,F:F,0)),TRUE,FALSE),FALSE)

    fluff and sandy method can work out as well.

+ 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] IF Statement Evaluates as "TRUE" but Returns "FALSE" Value (Excel 2007)
    By Simcik in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-11-2014, 12:43 PM
  2. Replies: 7
    Last Post: 03-17-2014, 01:51 PM
  3. compare two excel sheets using macros and display the result in "true" or "false"
    By gayunana01 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-09-2012, 07:21 AM
  4. Replies: 5
    Last Post: 10-12-2010, 06:46 AM
  5. Remove "TRUE" "FALSE" words from a linked checkbox
    By MDCK in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-15-2008, 03:26 AM
  6. Replies: 7
    Last Post: 05-13-2006, 05:02 PM
  7. [SOLVED] IF(VLOOKUP("MYDATA", MYNAME, 4) = 0, "TRUE", "FALSE")
    By Souris in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-17-2005, 01:05 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