COMPARING COLUMNS

Copper Contributor

HELLO

CAN ANYONE TELL ME HOW TO COMPARE TWO COLUMNS OF DATA (ONE LONG, ONE SHORT) AND REVEAL WHAT IS MISSING FROM THE SHORT LIST PLEASE?

16 Replies

@paulcalderwood 

Let's say you have data in Sheet1!B2:B10000 and in Sheet2!F2:F500

 

Enter the word MISSING in C1 on Sheet1, and enter the following formula in C2 on Sheet1:

 

=ISERROR(XMATCH(B2, Sheet1!$F$2:$F$500))

 

Fill down from C2.

This will return TRUE for the values that are not in the short list, FALSE for the rest.

You can sort or filter on the new column.

THANK YOU. IT IS VERY KIND OF YOU TO TRY AND HELP ME.

I HAVE FOLLOWED YOUR INSTRUCTIONS BUT WHEN i PULLED DOWN FROM C2 ALL THE CELLS READ false (EVEN THOUGH I KNOW THAT MOST ARE CORRECT)

@paulcalderwood 

Could you create a stripped-down copy of the workbook demonstrating the problem (without sensitive information) and make it available through one of the websites that let you upload and share a file, such as OneDrive, Google Drive, FileDropper or DropBox. Then post a link to the uploaded and shared file here.

 

(Please turn off Caps Lock)

Yes I could easily do that straightaway.
Thank you VERY MUCH.
I am not sure how to get the file to you

@paulcalderwood 

The link doesn't work for me, you will have to allow others to view and download the file.

I am sorry that my previous attempt to share this file with you failed.<br>I hope that the following link from OneDrive works better <a href="https://1drv.ms/x/c/d781fb931993107d/Ed8aCg4PnCFAuxwdz38hoiQBXKDZE2cCj2Rl0t818WkzGA?e=aTpwsV" target="_blank">https://1drv.ms/x/c/d781fb931993107d/Ed8aCg4PnCFAuxwdz38hoiQBXKDZE2cCj2Rl0t818WkzGA?e=aTpwsV</a><br><br>I have tried to share it via DropBox but that seems to require an email address for me to to send it to you and of course I do not have an address. Thank you for your help Paul
Intel Unison provided me with an alternative link which is https://unison.intel.com/swiftConnect?tm=JHHP-RHPW

@paulcalderwood 

The Dropbox link worked. If you want to return the 'missing' values to a separate range, enter the following formula in - for example - D1:

 

=FILKTER(A1:A197218, ISERROR(XMATCH(A1:A197218, B1:B188657)))

Dear Hans
I am enormously grateful to you for trying to help me and I am glad that you were able to take a look at the file via Dropbox.
I applied the solution you suggested but I am sorry to report that it did not come up with the right result unfortunately.
The difference between column A and column B is a shortfall of about 8,500 entires or cells in column B - but the formula you recommended has suggested a difference of 37,400 entries. So I am really puzzled about what to do.

@paulcalderwood 

Here is the file with the result in column D.

Can you provide a few examples of cells that should NOT have been listed in column D?

@paulcalderwood@paulcalderwood

This formula detects any value that does not occur twice (or more) in the combined columns.

= UNIQUE(VSTACK(columnA, columnB),,TRUE)

 

It appears that there are entries in the shorter list B that are not in A.  One way of eliminating them from the result would be to modify the formula to read

= UNIQUE(VSTACK(columnA, columnB, columnB),,TRUE)
Dear Hans
Thank you very much indeed! The problem has been solved.
When I did as you suggested and looked for examples of items that not have been listed in column D I came across an error that I had crept into the database - which I have now corrected and all is fine.
The difference in column D is now the right figure of 8500 approx.
Well done and thank you for your patience and kindness.