Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 50
Default Count Numbers Only Once in a Range

Does anyone know a formula that counts numbers in a range only once when they
appear. For example: Range includes 1.34 three times, 0.80 five times, and
0.27 15 times. The count formula counts the range 23 times rather than the 3
times I am looking for. Any help is greatly appreciated.

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Count Numbers Only Once in a Range

The below formula will give you the distinct count for range A2:A100.

=SUMPRODUCT((A2:A100<"")/COUNTIF(A2:A100,A2:A100&""))

If this post helps click Yes
---------------
Jacob Skaria


"iperlovsky" wrote:

Does anyone know a formula that counts numbers in a range only once when they
appear. For example: Range includes 1.34 three times, 0.80 five times, and
0.27 15 times. The count formula counts the range 23 times rather than the 3
times I am looking for. Any help is greatly appreciated.

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 50
Default Count Numbers Only Once in a Range

This formula works near perfectly. It just does not count 0 correctly - like
for example when one of the distinct numbers in the range is 0. Any
suggestions?

"Jacob Skaria" wrote:

The below formula will give you the distinct count for range A2:A100.

=SUMPRODUCT((A2:A100<"")/COUNTIF(A2:A100,A2:A100&""))

If this post helps click Yes
---------------
Jacob Skaria


"iperlovsky" wrote:

Does anyone know a formula that counts numbers in a range only once when they
appear. For example: Range includes 1.34 three times, 0.80 five times, and
0.27 15 times. The count formula counts the range 23 times rather than the 3
times I am looking for. Any help is greatly appreciated.

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Count Numbers Only Once in a Range

This should count everything except blanks. Try this in a new workbook
--
If this post helps click Yes
---------------
Jacob Skaria


"iperlovsky" wrote:

This formula works near perfectly. It just does not count 0 correctly - like
for example when one of the distinct numbers in the range is 0. Any
suggestions?

"Jacob Skaria" wrote:

The below formula will give you the distinct count for range A2:A100.

=SUMPRODUCT((A2:A100<"")/COUNTIF(A2:A100,A2:A100&""))

If this post helps click Yes
---------------
Jacob Skaria


"iperlovsky" wrote:

Does anyone know a formula that counts numbers in a range only once when they
appear. For example: Range includes 1.34 three times, 0.80 five times, and
0.27 15 times. The count formula counts the range 23 times rather than the 3
times I am looking for. Any help is greatly appreciated.

Thanks

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,104
Default Count Numbers Only Once in a Range

=SUMPRODUCT(1/(COUNTIF($A$1:$A$23,A1:$A$23)),A1:A23)
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"iperlovsky" wrote in message
...
Does anyone know a formula that counts numbers in a range only once when
they
appear. For example: Range includes 1.34 three times, 0.80 five times,
and
0.27 15 times. The count formula counts the range 23 times rather than
the 3
times I am looking for. Any help is greatly appreciated.

Thanks





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 50
Default Count Numbers Only Once in a Range

This formula returns a count of 1.34 for my first distinct number, 2.14 for
the second and 2.41 for the third. Any idea how we could troubleshoot this?

"Bernard Liengme" wrote:

=SUMPRODUCT(1/(COUNTIF($A$1:$A$23,A1:$A$23)),A1:A23)
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"iperlovsky" wrote in message
...
Does anyone know a formula that counts numbers in a range only once when
they
appear. For example: Range includes 1.34 three times, 0.80 five times,
and
0.27 15 times. The count formula counts the range 23 times rather than
the 3
times I am looking for. Any help is greatly appreciated.

Thanks




  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,104
Default Count Numbers Only Once in a Range

I do not follow. I typed the numbers in your example into a column A.
My formula gave me the result of 1.34 + 0.08 + 0.27 = 1.69
Send me a sample file - get my email from bottom of my website
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"iperlovsky" wrote in message
...
This formula returns a count of 1.34 for my first distinct number, 2.14
for
the second and 2.41 for the third. Any idea how we could troubleshoot
this?

"Bernard Liengme" wrote:

=SUMPRODUCT(1/(COUNTIF($A$1:$A$23,A1:$A$23)),A1:A23)
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"iperlovsky" wrote in message
...
Does anyone know a formula that counts numbers in a range only once
when
they
appear. For example: Range includes 1.34 three times, 0.80 five times,
and
0.27 15 times. The count formula counts the range 23 times rather than
the 3
times I am looking for. Any help is greatly appreciated.

Thanks






  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Count Numbers Only Once in a Range

Try this:

=SUM(--(FREQUENCY(A1:A25,A1:A25)0))

--
Biff
Microsoft Excel MVP


"iperlovsky" wrote in message
...
Does anyone know a formula that counts numbers in a range only once when
they
appear. For example: Range includes 1.34 three times, 0.80 five times,
and
0.27 15 times. The count formula counts the range 23 times rather than
the 3
times I am looking for. Any help is greatly appreciated.

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
Count the cell contain a specific numbers in a range Simon Excel Discussion (Misc queries) 5 January 31st 08 01:52 AM
Count unique numbers in a range with a given criteria Nelson Excel Discussion (Misc queries) 4 February 9th 07 01:28 PM
Count comma separated numbers, numbers in a range with dash, not t Mahendra Excel Discussion (Misc queries) 0 August 8th 05 05:56 PM
get a count of numbers whose value falls within a given range LyleB_Austin Excel Worksheet Functions 5 August 3rd 05 04:38 PM
How do I count numbers in a range that are greater than and less . Clinic Reporter Excel Worksheet Functions 1 April 13th 05 08:47 AM


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

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

About Us

"It's about Microsoft Excel"