N
N
nivaech2020-11-20 14:09:48
excel
nivaech, 2020-11-20 14:09:48

How to compare two cells in Excel and display non-repeating values?

It is necessary to compare two cells in Excel, and as a result of the function execution, return the values ​​of the numbers that do not match in these cells.

For example:
Cell A: 2, 5, 7, 9, 3
Cell B: 3, 4, 7, 2, 9

The numbers that are in both cells should be ignored - these are 2, 7, 3, 9
And those that are not repeated , and should be issued as a result, that is, these are 4 and 5.
How can this be done?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Alexander, 2020-11-20
@StupidQuestion

And if ....
Select 2 columns
Main -> Conditional Formatting -> Cell Selection Rules -> Duplicate Values...

A
Alexander, 2020-11-20
@ForestAndGarden

planetaexcel.ru/techniques/7/5636/

J
John Smith, 2020-11-20
@ClearAirTurbulence

nothing is clear.
There is no cell A in Excel. It may contain cell A1, A2, etc.
So either you are talking about columns-rows, or you store data in cell A1 as a string with the value "2, 5, 7, 9, 3", etc.
It's easier to insert a screenshot.
When it comes to columns, you can use conditional formatting.
see the section "Example: Compare Two Columns and Highlight Mismatched Data" in the article
https://trumpexcel.com/compare-two-columns/
5fb7bb5e4f44e126079480.jpeg

G
Grigory Boev, 2020-11-20
@ProgrammerForever

C1 : =IF(A1=B1;A1;"")
D1 : =IF(A1=B1;B1;"")
... and propagate down
Google Sheets is even easier:
=FILTER(a:b;a:a<>b:b)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question