Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 177
Default count number of duplicates between 2 columns

Col A Col B
apples apples
oranges pears
pears bananas
pineapplies coconuts
grapes
raisins


Count the number of times that data in column A matches the data in column B

the formula in this case would return: 2

thanks

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,805
Default count number of duplicates between 2 columns

Enter this in C1 against apples in A1
=COUNTIF($B$1:$B$6,A1)
and copy down

"SteveC" wrote:

Col A Col B
apples apples
oranges pears
pears bananas
pineapplies coconuts
grapes
raisins


Count the number of times that data in column A matches the data in column B

the formula in this case would return: 2

thanks

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 177
Default count number of duplicates between 2 columns

Thanks... but hoping for a single formula with no helper columns... thanks...


"Sheeloo" wrote:

Enter this in C1 against apples in A1
=COUNTIF($B$1:$B$6,A1)
and copy down

"SteveC" wrote:

Col A Col B
apples apples
oranges pears
pears bananas
pineapplies coconuts
grapes
raisins


Count the number of times that data in column A matches the data in column B

the formula in this case would return: 2

thanks

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,805
Default count number of duplicates between 2 columns

No problme.

Use
=COUNTIF($B$1:$B$6,B1)
assuming you have values in Col B.

"SteveC" wrote:

Thanks... but hoping for a single formula with no helper columns... thanks...


"Sheeloo" wrote:

Enter this in C1 against apples in A1
=COUNTIF($B$1:$B$6,A1)
and copy down

"SteveC" wrote:

Col A Col B
apples apples
oranges pears
pears bananas
pineapplies coconuts
grapes
raisins


Count the number of times that data in column A matches the data in column B

the formula in this case would return: 2

thanks

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 177
Default count number of duplicates between 2 columns

oh, and one more thing, don't count number of matching blank cells

"SteveC" wrote:

Thanks... but hoping for a single formula with no helper columns... thanks...


"Sheeloo" wrote:

Enter this in C1 against apples in A1
=COUNTIF($B$1:$B$6,A1)
and copy down

"SteveC" wrote:

Col A Col B
apples apples
oranges pears
pears bananas
pineapplies coconuts
grapes
raisins


Count the number of times that data in column A matches the data in column B

the formula in this case would return: 2

thanks



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,805
Default count number of duplicates between 2 columns

I use
=COUNTIF($B$1:B1,B1)

This give me 1 against the first occurrence, 2 against the second and so
on... I can then retain the rows with 1 and delete others.

"SteveC" wrote:

Thanks... but hoping for a single formula with no helper columns... thanks...


"Sheeloo" wrote:

Enter this in C1 against apples in A1
=COUNTIF($B$1:$B$6,A1)
and copy down

"SteveC" wrote:

Col A Col B
apples apples
oranges pears
pears bananas
pineapplies coconuts
grapes
raisins


Count the number of times that data in column A matches the data in column B

the formula in this case would return: 2

thanks

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 177
Default count number of duplicates between 2 columns

That would do it if I was only worried about Column B, but I want to compare
it against Column A. I just posted a new question with more details about
the problem. Thanks for taking the time to help.


"Sheeloo" wrote:

No problme.

Use
=COUNTIF($B$1:$B$6,B1)
assuming you have values in Col B.

"SteveC" wrote:

Thanks... but hoping for a single formula with no helper columns... thanks...


"Sheeloo" wrote:

Enter this in C1 against apples in A1
=COUNTIF($B$1:$B$6,A1)
and copy down

"SteveC" wrote:

Col A Col B
apples apples
oranges pears
pears bananas
pineapplies coconuts
grapes
raisins


Count the number of times that data in column A matches the data in column B

the formula in this case would return: 2

thanks

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,480
Default count number of duplicates between 2 columns

Hi Steve

Try
=SUMPRODUCT(--(ISNUMBER(MATCH(A1:A6,B1:B6,0))))

--
Regards
Roger Govier

"SteveC" wrote in message
...
oh, and one more thing, don't count number of matching blank cells

"SteveC" wrote:

Thanks... but hoping for a single formula with no helper columns...
thanks...


"Sheeloo" wrote:

Enter this in C1 against apples in A1
=COUNTIF($B$1:$B$6,A1)
and copy down

"SteveC" wrote:

Col A Col B
apples apples
oranges pears
pears bananas
pineapplies coconuts
grapes
raisins


Count the number of times that data in column A matches the data in
column B

the formula in this case would return: 2

thanks

  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default count number of duplicates between 2 columns

Try this:

=SUMPRODUCT(--(ISNUMBER(MATCH(A1:A4,B1:B6,0))))

--
Biff
Microsoft Excel MVP


"SteveC" wrote in message
...
Col A Col B
apples apples
oranges pears
pears bananas
pineapplies coconuts
grapes
raisins


Count the number of times that data in column A matches the data in column
B

the formula in this case would return: 2

thanks



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 do I compare two columns and return a number count 9274211 Excel Worksheet Functions 2 August 6th 08 03:05 AM
Count Employee Work Time - Don't Count Duplicates J Excel Worksheet Functions 3 May 1st 07 10:47 PM
Pivot Table - How do I count number of columns? vicky Excel Discussion (Misc queries) 5 August 8th 06 01:26 PM
count duplicates/total number of occurances Rishi Aggarwal Excel Discussion (Misc queries) 3 December 28th 05 04:15 AM
Count number of unique items in a column that contains duplicates Steembeem Excel Worksheet Functions 3 February 2nd 05 12:51 AM


All times are GMT +1. The time now is 12:12 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"