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 » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

counting values ignoring duplicates



 
 
Thread Tools Display Modes
  #1  
Old July 14th, 2008, 12:17 PM posted to microsoft.public.excel.worksheet.functions
matt3542
external usenet poster
 
Posts: 21
Default counting values ignoring duplicates

Hi there,

I am trying to count the number of values in a column (A2:A217) ignoring
duplicated values. As an eg, applying this to the data below I would expect
the count value to be 3. Please can anyone help, many thanks, Matt

00013270
00018038
00018038
00018038
00018038
00018038
00018038
00018038
00018038
00018038
00018038
00023049
00023049
00023049

  #2  
Old July 14th, 2008, 12:30 PM posted to microsoft.public.excel.worksheet.functions
Jarek Kujawa[_2_]
external usenet poster
 
Posts: 775
Default counting values ignoring duplicates

http://www.cpearson.com/Excel/Duplicates.aspx
  #3  
Old July 14th, 2008, 12:30 PM posted to microsoft.public.excel.worksheet.functions
Dave Peterson
external usenet poster
 
Posts: 19,791
Default counting values ignoring duplicates

You can use a formula like:
=SUMPRODUCT((A1:A10"")/COUNTIF(A1:A10,A1:A10&""))
to count the number of unique entries in A1:A10.

You may want to look at Chip Pearson's site. He has lots of techniques to work
with duplicates:
http://www.cpearson.com/excel/Duplicates.aspx


matt3542 wrote:

Hi there,

I am trying to count the number of values in a column (A2:A217) ignoring
duplicated values. As an eg, applying this to the data below I would expect
the count value to be 3. Please can anyone help, many thanks, Matt

00013270
00018038
00018038
00018038
00018038
00018038
00018038
00018038
00018038
00018038
00018038
00023049
00023049
00023049


--

Dave Peterson
  #4  
Old July 14th, 2008, 12:31 PM posted to microsoft.public.excel.worksheet.functions
Bob Phillips
external usenet poster
 
Posts: 5,994
Default counting values ignoring duplicates

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

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"matt3542" wrote in message
...
Hi there,

I am trying to count the number of values in a column (A2:A217) ignoring
duplicated values. As an eg, applying this to the data below I would
expect
the count value to be 3. Please can anyone help, many thanks, Matt

00013270
00018038
00018038
00018038
00018038
00018038
00018038
00018038
00018038
00018038
00018038
00023049
00023049
00023049



  #5  
Old July 14th, 2008, 12:32 PM posted to microsoft.public.excel.worksheet.functions
Lars-Åke Aspelin[_2_]
external usenet poster
 
Posts: 722
Default counting values ignoring duplicates

On Mon, 14 Jul 2008 04:17:02 -0700, matt3542
wrote:

Hi there,

I am trying to count the number of values in a column (A2:A217) ignoring
duplicated values. As an eg, applying this to the data below I would expect
the count value to be 3. Please can anyone help, many thanks, Matt

00013270
00018038
00018038
00018038
00018038
00018038
00018038
00018038
00018038
00018038
00018038
00023049
00023049
00023049



Try this formula:

=SUM(1/COUNTIF(A2:A217,A2:A217))

Hope this helps / Lars-Åke
  #6  
Old July 14th, 2008, 12:41 PM posted to microsoft.public.excel.worksheet.functions
matt3542
external usenet poster
 
Posts: 21
Default counting values ignoring duplicates

Thanks very much, that worked perfectly

"Dave Peterson" wrote:

You can use a formula like:
=SUMPRODUCT((A1:A10"")/COUNTIF(A1:A10,A1:A10&""))
to count the number of unique entries in A1:A10.

You may want to look at Chip Pearson's site. He has lots of techniques to work
with duplicates:
http://www.cpearson.com/excel/Duplicates.aspx


matt3542 wrote:

Hi there,

I am trying to count the number of values in a column (A2:A217) ignoring
duplicated values. As an eg, applying this to the data below I would expect
the count value to be 3. Please can anyone help, many thanks, Matt

00013270
00018038
00018038
00018038
00018038
00018038
00018038
00018038
00018038
00018038
00018038
00023049
00023049
00023049


--

Dave Peterson

  #7  
Old July 14th, 2008, 12:57 PM posted to microsoft.public.excel.worksheet.functions
matt3542
external usenet poster
 
Posts: 21
Default counting values ignoring duplicates

Thanks for the link, appreciated, will undoubtedly come in handy for future
queries

"Jarek Kujawa" wrote:

http://www.cpearson.com/Excel/Duplicates.aspx

  #8  
Old July 14th, 2008, 02:48 PM posted to microsoft.public.excel.worksheet.functions
matt3542
external usenet poster
 
Posts: 21
Default counting values ignoring duplicates

Hi Bob, this also worked, many thanks, appreciated

"Bob Phillips" wrote:

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

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"matt3542" wrote in message
...
Hi there,

I am trying to count the number of values in a column (A2:A217) ignoring
duplicated values. As an eg, applying this to the data below I would
expect
the count value to be 3. Please can anyone help, many thanks, Matt

00013270
00018038
00018038
00018038
00018038
00018038
00018038
00018038
00018038
00018038
00018038
00023049
00023049
00023049




  #9  
Old July 15th, 2008, 06:19 AM posted to microsoft.public.excel.worksheet.functions
ryguy7272
external usenet poster
 
Posts: 1,593
Default counting values ignoring duplicates

I can come up with at least 9 ways to do this; any more is moot:
=SUMPRODUCT((A1:A78"")/(COUNTIF(A1:A78,A1:A78)+(A1:A78="")))
=SUM(IF(FREQUENCY(IF(LEN(A1:A971)0,MATCH(A1:A971, A1:A971,0),""),IF(LEN(A1:A971)0,MATCH(A1:A971,A1: A971,0),""))0,1))
(this is a CSE function; you must hit Ctrl + Shift + Enter at the same time)
=SUM(IF(A1:A400"",1/COUNTIF(A1:A400,A1:A400)))
(this is a CSE function; you must hit Ctrl + Shift + Enter at the same time)
=SUMPRODUCT((A1:A78"")/(COUNTIF(A1:A78,A1:A78&"")))
(this is a CSE function; you must hit Ctrl + Shift + Enter at the same time)
=SUM(--(FREQUENCY(IF(A1:A2676"",MATCH(A1:A2676,A1:A2676 ,0)),ROW(INDIRECT("1:"&ROWS(A1:A2676))))0))
(this is a CSE function; you must hit Ctrl + Shift + Enter at the same time)

Regards,
Ryan---

--
RyGuy


"Lars-Ã…ke Aspelin" wrote:

On Mon, 14 Jul 2008 04:17:02 -0700, matt3542
wrote:

Hi there,

I am trying to count the number of values in a column (A2:A217) ignoring
duplicated values. As an eg, applying this to the data below I would expect
the count value to be 3. Please can anyone help, many thanks, Matt

00013270
00018038
00018038
00018038
00018038
00018038
00018038
00018038
00018038
00018038
00018038
00023049
00023049
00023049



Try this formula:

=SUM(1/COUNTIF(A2:A217,A2:A217))

Hope this helps / Lars-Ã…ke

  #10  
Old July 15th, 2008, 09:49 AM posted to microsoft.public.excel.worksheet.functions
matt3542
external usenet poster
 
Posts: 21
Default counting values ignoring duplicates

Wow, thanks for taking the time to give me so many options, this has been
incredibly helpful!

"ryguy7272" wrote:

I can come up with at least 9 ways to do this; any more is moot:
=SUMPRODUCT((A1:A78"")/(COUNTIF(A1:A78,A1:A78)+(A1:A78="")))
=SUM(IF(FREQUENCY(IF(LEN(A1:A971)0,MATCH(A1:A971, A1:A971,0),""),IF(LEN(A1:A971)0,MATCH(A1:A971,A1: A971,0),""))0,1))
(this is a CSE function; you must hit Ctrl + Shift + Enter at the same time)
=SUM(IF(A1:A400"",1/COUNTIF(A1:A400,A1:A400)))
(this is a CSE function; you must hit Ctrl + Shift + Enter at the same time)
=SUMPRODUCT((A1:A78"")/(COUNTIF(A1:A78,A1:A78&"")))
(this is a CSE function; you must hit Ctrl + Shift + Enter at the same time)
=SUM(--(FREQUENCY(IF(A1:A2676"",MATCH(A1:A2676,A1:A2676 ,0)),ROW(INDIRECT("1:"&ROWS(A1:A2676))))0))
(this is a CSE function; you must hit Ctrl + Shift + Enter at the same time)

Regards,
Ryan---

--
RyGuy


"Lars-Ã…ke Aspelin" wrote:

On Mon, 14 Jul 2008 04:17:02 -0700, matt3542
wrote:

Hi there,

I am trying to count the number of values in a column (A2:A217) ignoring
duplicated values. As an eg, applying this to the data below I would expect
the count value to be 3. Please can anyone help, many thanks, Matt

00013270
00018038
00018038
00018038
00018038
00018038
00018038
00018038
00018038
00018038
00018038
00023049
00023049
00023049



Try this formula:

=SUM(1/COUNTIF(A2:A217,A2:A217))

Hope this helps / Lars-Ã…ke

 




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 04:19 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.