ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Comparing two columns in two different worksheets (https://www.excelbanter.com/excel-worksheet-functions/28177-comparing-two-columns-two-different-worksheets.html)

stevel

Comparing two columns in two different worksheets
 
I am trying to compare numbers in two different worksheets. In worksheet one
I have a list of number and in worksheet two I have a list of numbers, but I
want to know if a number appears in both worksheets. How do I do this?
Thanks in advance for your assistance.



Alan

With the lists in Sheet1 Column A and Sheet2 Column A, somewhere else
=IF(AND(COUNTIF(Sheet1!A:A,Sheet1!A1)0,COUNTIF(Sh eet2!A:A,Sheet2!A1)0),"Duplicate","")
and copy dwn to the last cell in the ranges,
Regards,
Alan.
"stevel" wrote in message
...
I am trying to compare numbers in two different worksheets. In worksheet
one
I have a list of number and in worksheet two I have a list of numbers, but
I
want to know if a number appears in both worksheets. How do I do this?
Thanks in advance for your assistance.





Alan

Sorry, that doesnt work, please ignore,
Cringe,
Alan.
=IF(AND(COUNTIF(Sheet1!A:A,Sheet1!A1)0,COUNTIF(Sh eet2!A:A,Sheet2!A1)0),"Duplicate","")"Alan" wrote in .. . With the lists in Sheet1 Column A and Sheet2 Column A, somewhere else=IF(AND(COUNTIF(Sheet1!A:A,Sheet1!A1)0,COUNT IF(Sheet2!A:A,Sheet2!A1)0),"Duplicate","") and copy dwn to the last cell in the ranges, Regards, Alan. "stevel" wrote in ...I am trying to compare numbers in two different worksheets. In worksheetone I have a list of number and in worksheet two I have a list of numbers,but I want to know if a number appears in both worksheets. How do I do this? Thanks in advance for your assistance.


Peo Sjoblom

Use a simple countif, assume you do this in sheet1 and the other list is in
sheet2, insert a new column next to the one in sheet1 assume the list is in A
and the new column is B

=IF(COUNTIF('Sheet2'!$A$1:$A$500,A1)0,"Exists","N on-existant")

copy down the formula

Regards,

Peo Sjoblom

"stevel" wrote:

I am trying to compare numbers in two different worksheets. In worksheet one
I have a list of number and in worksheet two I have a list of numbers, but I
want to know if a number appears in both worksheets. How do I do this?
Thanks in advance for your assistance.



stevel

I am just trying to be clear on how to use the formula, so if I have two
separate spreadsheets with numbers and I want to see if the same numbers
appear in both spreadsheets this formula should work? Thanks again for your
assistance.

"Peo Sjoblom" wrote:

Use a simple countif, assume you do this in sheet1 and the other list is in
sheet2, insert a new column next to the one in sheet1 assume the list is in A
and the new column is B

=IF(COUNTIF('Sheet2'!$A$1:$A$500,A1)0,"Exists","N on-existant")

copy down the formula

Regards,

Peo Sjoblom

"stevel" wrote:

I am trying to compare numbers in two different worksheets. In worksheet one
I have a list of number and in worksheet two I have a list of numbers, but I
want to know if a number appears in both worksheets. How do I do this?
Thanks in advance for your assistance.




All times are GMT +1. The time now is 04:14 AM.

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