A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Count but ignore duplicate data



 
 
Thread Tools Display Modes
  #1  
Old April 20th, 2010, 02:06 PM posted to microsoft.public.excel.misc
Rechie
external usenet poster
 
Posts: 59
Default Count but ignore duplicate data

Hi Expert, I need your help on how to count data but to ignore duplicates.

Below count results should be = 3 (ignore duplicates)
Inv No.
9123
9123
9125
9128
9128

Thanks for your support,
  #2  
Old April 20th, 2010, 02:12 PM posted to microsoft.public.excel.misc
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default Count but ignore duplicate data

Try
=SUMPRODUCT((A2:A10"")/COUNTIF(A2:A10,A2:A10&""))

--
Jacob (MVP - Excel)


"Rechie" wrote:

Hi Expert, I need your help on how to count data but to ignore duplicates.

Below count results should be = 3 (ignore duplicates)
Inv No.
9123
9123
9125
9128
9128

Thanks for your support,

  #3  
Old April 20th, 2010, 02:15 PM posted to microsoft.public.excel.misc
Mike H
external usenet poster
 
Posts: 8,419
Default Count but ignore duplicate data

Hi,

One way

=SUMPRODUCT((A2:A10"")/COUNTIF(A2:A10,A2:A10&""))

Note that Bernd P has done an analysis of different methods of doing this
dependent on dataset size. look here.


http://www.sulprobil.com/html/count_unique.html
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Rechie" wrote:

Hi Expert, I need your help on how to count data but to ignore duplicates.

Below count results should be = 3 (ignore duplicates)
Inv No.
9123
9123
9125
9128
9128

Thanks for your support,

  #4  
Old April 20th, 2010, 02:29 PM posted to microsoft.public.excel.misc
Rechie
external usenet poster
 
Posts: 59
Default Count but ignore duplicate data


Thanks Guys,

It is working well.

  #5  
Old April 20th, 2010, 02:54 PM posted to microsoft.public.excel.misc
Mike H
external usenet poster
 
Posts: 8,419
Default Count but ignore duplicate data

Glad to help but don't forget to check out the link I gave you because the
sumproduct method becomes very slow for larger datasets and the website has
other better methods
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Rechie" wrote:


Thanks Guys,

It is working well.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


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