Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default How can I find out if numbers in one column are also in a secondcolumn please?

Hello - I hope someone can help please - I'm a bit of a novice it has
to be said !

I have 2 columns of about 800 numbers (varying number of digits
between 6 and 8) and I need to find out how many of the numbers in
column A are also in column B. I just need a total really - don't need
to know which numbers recur

I've been looking at countif and lookup and match and getting very
confused !

It sounds like it should be easy but I'm stumped

Can anyone sort me out?

Robert
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default How can I find out if numbers in one column are also in a second column please?

Are there duplicate numbers in the same column?

1...1
4...3
3...1

Depending on which column you compare to the other column you can get
different results.

If you compare the left column to the right column then you get a result of
2. If you compare the right column to the left column then you get a result
of 3. Are both columns the same length?

--
Biff
Microsoft Excel MVP


"RobertSE6" wrote in message
...
Hello - I hope someone can help please - I'm a bit of a novice it has
to be said !

I have 2 columns of about 800 numbers (varying number of digits
between 6 and 8) and I need to find out how many of the numbers in
column A are also in column B. I just need a total really - don't need
to know which numbers recur

I've been looking at countif and lookup and match and getting very
confused !

It sounds like it should be easy but I'm stumped

Can anyone sort me out?

Robert



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default How can I find out if numbers in one column are also in a secondcolumn please?

Hi - thanks for the reply - no the numbers are not repeated in the
same column and the columns are of different lengths - I want to know
if the number in for example cell A1 is anywhere in Column B, then
same for A2 etc. But if it makes it easier I only need one final total
- how many in column A appear in column B Hope I'm making sense! If it
makes it any clearer the first column is staff employed a year ago
(their payroll numbers) and column b is the staff in post now

Rob
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default How can I find out if numbers in one column are also in a second column please?

Ok, try this...

It's better to compare the shortest column to the longer column. Let's
assume column B is the shorter of the 2 columns.

=SUMPRODUCT(--(ISNUMBER(MATCH(B1:B50,A1:A100,0))))

--
Biff
Microsoft Excel MVP


"RobertSE6" wrote in message
...
Hi - thanks for the reply - no the numbers are not repeated in the
same column and the columns are of different lengths - I want to know
if the number in for example cell A1 is anywhere in Column B, then
same for A2 etc. But if it makes it easier I only need one final total
- how many in column A appear in column B Hope I'm making sense! If it
makes it any clearer the first column is staff employed a year ago
(their payroll numbers) and column b is the staff in post now

Rob



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default How can I find out if numbers in one column are also in a secondcolumn please?

Actually its the other way round - Column A is shorter - with 753 rows
and Column B has 827

If I use these numbers in your formula is that going to give me the
correct answer - or do I need to amend the formula?

So I'm using

=SUMPRODUCT(--(ISNUMBER(MATCH(B1:B827,A1:A752,0))))

Thanks

Rob


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default How can I find out if numbers in one column are also in a second column please?

It'll work either way:

=SUMPRODUCT(--(ISNUMBER(MATCH(B1:B827,A1:A752,0))))

=SUMPRODUCT(--(ISNUMBER(MATCH(A1:A752,B1:B827,0))))

The idea of comparing the shortest column to the longer column is that there
are less items to "look for". Based on your ranges this won't make any
significant difference.


--
Biff
Microsoft Excel MVP


"RobertSE6" wrote in message
...
Actually its the other way round - Column A is shorter - with 753 rows
and Column B has 827

If I use these numbers in your formula is that going to give me the
correct answer - or do I need to amend the formula?

So I'm using

=SUMPRODUCT(--(ISNUMBER(MATCH(B1:B827,A1:A752,0))))

Thanks

Rob



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default How can I find out if numbers in one column are also in a seco

Give this a try:
=SUMPRODUCT(--(COUNTIF(D6:D12,E6:E12)))

Try it on a small sample to verify that it works, and then change your
ranges to match your actual data.

HTH,
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"T. Valko" wrote:

Are there duplicate numbers in the same column?

1...1
4...3
3...1

Depending on which column you compare to the other column you can get
different results.

If you compare the left column to the right column then you get a result of
2. If you compare the right column to the left column then you get a result
of 3. Are both columns the same length?

--
Biff
Microsoft Excel MVP


"RobertSE6" wrote in message
...
Hello - I hope someone can help please - I'm a bit of a novice it has
to be said !

I have 2 columns of about 800 numbers (varying number of digits
between 6 and 8) and I need to find out how many of the numbers in
column A are also in column B. I just need a total really - don't need
to know which numbers recur

I've been looking at countif and lookup and match and getting very
confused !

It sounds like it should be easy but I'm stumped

Can anyone sort me out?

Robert



.

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default How can I find out if numbers in one column are also in a seco

Thanks very much Ryan - will give that a go aswell
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default How can I find out if numbers in one column are also in a secondcolumn please?

Thanks very much for all your help - job done!

Robert
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default How can I find out if numbers in one column are also in a second column please?

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"RobertSE6" wrote in message
...
Thanks very much for all your help - job done!

Robert



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find missing numbers in a column Spacy22 Excel Discussion (Misc queries) 3 January 28th 09 02:10 AM
find duplicate numbers in a column? JENNYC Excel Discussion (Misc queries) 5 November 3rd 05 10:05 PM
need to find which numbers (3+) in a column sum to a value Devin Excel Discussion (Misc queries) 1 February 11th 05 10:30 PM
I need to find odd numbers in a column whouser Excel Worksheet Functions 3 January 27th 05 06:47 PM
How can you find duplicate numbers in a column? Alvin Excel Worksheet Functions 1 January 15th 05 11:24 PM


All times are GMT +1. The time now is 05:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"