Excel moving non-duplicate values ​​between two columns to a third


I have a question and I can't get a plausible answer.
I have a spreadsheet where I would like to do a comparison between two columns and tell it that if there is a value that is not duplicated, that same value will be moved to a new column. For example:

I have Column " A " and " B ", in these columns there is a sequence of 6-digit numbers, for example:

   A       B

519294  519522
519364  519499
519365  519501
519366  519500
519381  519494
519382  519492
519389  519493
519422  519491
519428  519483

I want to make a comparison of column "A" using column "B", if the value of column "A" is not found in column "B" this same value must be moved to a new column "C" for example.

If possible I would like to use a formula or a VBA that performs this query and if it was a false value where that value was not found in column "B" it could be moved.

I am very grateful if anyone can help me with a VBA or Formula.


Will a VLOOKUP combined with SE and SEERRO not solve you?


Explanation: If VLOOKUP returns an error indicating that the value in A was not found in B, the formula returns the value of A. If the value in A is found in B, the formula returns empty ("").

Scroll to Top