Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
spalmarez
 
Posts: n/a
Default Distinct Value With Countif


Hi,
I am looking for help with distinct values using countif. This is
what I have so far. Please help.

A B
C
01/03/05 01/18/04 =Countif(A1:A14,"<="&B2) which equals 13 but I
want distinct values, which my value I want is 12
01/04/05
01/04/05
01/05/05
01/06/05
01/07/05
01/10/05
01/11/05
01/12/05
01/13/05
01/14/05
01/17/05
01/18/05
01/19/05


--
spalmarez
------------------------------------------------------------------------
spalmarez's Profile: http://www.excelforum.com/member.php...o&userid=15961
View this thread: http://www.excelforum.com/showthread...hreadid=275769

  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

How about:

=SUMPRODUCT((A1:A14<=B2)/COUNTIF(A1:A14,A1:A14&""))

spalmarez wrote:

Hi,
I am looking for help with distinct values using countif. This is
what I have so far. Please help.

A B
C
01/03/05 01/18/04 =Countif(A1:A14,"<="&B2) which equals 13 but I
want distinct values, which my value I want is 12
01/04/05
01/04/05
01/05/05
01/06/05
01/07/05
01/10/05
01/11/05
01/12/05
01/13/05
01/14/05
01/17/05
01/18/05
01/19/05

--
spalmarez
------------------------------------------------------------------------
spalmarez's Profile: http://www.excelforum.com/member.php...o&userid=15961
View this thread: http://www.excelforum.com/showthread...hreadid=275769


--

Dave Peterson

  #3   Report Post  
Aladin Akyurek
 
Posts: n/a
Default


=SUM(--(FREQUENCY(IF(A2:A15<=B2,MATCH(A2:A15,A2:A15,0)),R OW(INDIRECT("1:"&ROWS(A2:A15)))-1)0))

which you need to confirm with control+shift+enter instead of just with
enter.

spalmarez Wrote:
Hi,
I am looking for help with distinct values using countif. This is
what I have so far. Please help.

A B
C
01/03/05 01/18/04 =Countif(A1:A14,"<="&B2) which equals 13 but I
want distinct values, which my value I want is 12
01/04/05
01/04/05
01/05/05
01/06/05
01/07/05
01/10/05
01/11/05
01/12/05
01/13/05
01/14/05
01/17/05
01/18/05
01/19/05



--
Aladin Akyurek
------------------------------------------------------------------------
Aladin Akyurek's Profile: http://www.excelforum.com/member.php...fo&userid=4165
View this thread: http://www.excelforum.com/showthread...hreadid=275769

  #4   Report Post  
Harlan Grove
 
Posts: n/a
Default

"Aladin Akyurek" wrote...
=SUM(--(FREQUENCY(IF(A2:A15<=B2,MATCH(A2:A15,A2:A15,0)),
ROW(INDIRECT("1:"&ROWS(A2:A15)))-1)0))

....

=SUMPRODUCT((A2:A15<=B2)/COUNTIF(A2:A15,A2:A15))

may be more efficient, and it doesn't have to be entered as an array
formula.


  #5   Report Post  
Aladin Akyurek
 
Posts: n/a
Default


Harlan Grove Wrote:
"Aladin Akyurek" wrote...
=SUM(--(FREQUENCY(IF(A2:A15<=B2,MATCH(A2:A15,A2:A15,0)),
ROW(INDIRECT("1:"&ROWS(A2:A15)))-1)0))

....

=SUMPRODUCT((A2:A15<=B2)/COUNTIF(A2:A15,A2:A15))

may be more efficient, and it doesn't have to be entered as an array
formula.


Yeah. As long as the same range is involved, the formula should work,
something I tend to forget.


--
Aladin Akyurek
------------------------------------------------------------------------
Aladin Akyurek's Profile: http://www.excelforum.com/member.php...fo&userid=4165
View this thread: http://www.excelforum.com/showthread...hreadid=275769

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
Subtotal And Countif Sheryl Excel Discussion (Misc queries) 4 December 9th 04 07:18 PM
countif reno Excel Worksheet Functions 5 November 5th 04 12:20 PM
Countif, Sumif, If - help! Angel160 Excel Worksheet Functions 2 November 3rd 04 05:23 PM
countif, again Liz G Excel Worksheet Functions 2 November 1st 04 11:20 PM
combining countif formulas Liz G Excel Worksheet Functions 3 November 1st 04 09:34 PM


All times are GMT +1. The time now is 06:40 AM.

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"