ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How can I match numbers from two columns? (https://www.excelbanter.com/excel-discussion-misc-queries/47155-how-can-i-match-numbers-two-columns.html)

Lea

How can I match numbers from two columns?
 
I have two columns with numbers. Some numbers are in both columns, some not.
What I need to get is some formula that can compare both columns and tell me
wich numbers are already in column 1 and what numbers are not.
Something like this:

234 222 It's not in column A
444 300 Yes, it's in column A
300 150 It's not in column A

I'll appreciate any help!






Rowan

One way assuming the list you want to check is in column B starting in
row 1, in C1 enter the formula:
=IF(ISNA(VLOOKUP(B1,A:A,1,0)),"It's not in Column A","Yes, it's in
column A")
and copy down.

Hope this helps
Rowan

Lea wrote:
I have two columns with numbers. Some numbers are in both columns, some not.
What I need to get is some formula that can compare both columns and tell me
wich numbers are already in column 1 and what numbers are not.
Something like this:

234 222 It's not in column A
444 300 Yes, it's in column A
300 150 It's not in column A

I'll appreciate any help!






papou

Hello Lea
=IF(NOT(ISERROR(MATCH(B1,$A$1:$A$8,0))),"Yes it's in column A","it's not in
column A")
Please amend accordingly (only values in A1 through A8 tested here)

HTH
Cordially
Pascal

"Lea" <Lea @discussions.microsoft.com a écrit dans le message de news:
...
I have two columns with numbers. Some numbers are in both columns, some
not.
What I need to get is some formula that can compare both columns and tell
me
wich numbers are already in column 1 and what numbers are not.
Something like this:

234 222 It's not in column A
444 300 Yes, it's in column A
300 150 It's not in column A

I'll appreciate any help!









All times are GMT +1. The time now is 12:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com