Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
OVERLOAD
 
Posts: n/a
Default Count how many different text values in an array.

I want to count the number of different text values in an unsorted column.
EXAMPLE:
I have a variety of text values in column 'A', for instance the 'city' value
of a persons address. And I have 5000 rows of data in the spreadsheet,
random people from all over the country.
I want to know how many different cities are represented by the random group
of people.

Is there a way to "COUNT" an array but count each unique value only once.
  #2   Report Post  
Ragdyer
 
Posts: n/a
Default

Try this:

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

With SumProduct, you *cannot* use an entire column reference (A:A).
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"OVERLOAD" wrote in message
...
I want to count the number of different text values in an unsorted column.
EXAMPLE:
I have a variety of text values in column 'A', for instance the 'city'

value
of a persons address. And I have 5000 rows of data in the spreadsheet,
random people from all over the country.
I want to know how many different cities are represented by the random

group
of people.

Is there a way to "COUNT" an array but count each unique value only once.


  #3   Report Post  
OVERLOAD
 
Posts: n/a
Default

That worked......thanks........

"Ragdyer" wrote:

Try this:

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

With SumProduct, you *cannot* use an entire column reference (A:A).
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"OVERLOAD" wrote in message
...
I want to count the number of different text values in an unsorted column.
EXAMPLE:
I have a variety of text values in column 'A', for instance the 'city'

value
of a persons address. And I have 5000 rows of data in the spreadsheet,
random people from all over the country.
I want to know how many different cities are represented by the random

group
of people.

Is there a way to "COUNT" an array but count each unique value only once.



  #4   Report Post  
RagDyeR
 
Posts: n/a
Default

Appreciate the feed-back.
--

Regards,

RD
--------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
--------------------------------------------------------------------

"OVERLOAD" wrote in message
...
That worked......thanks........

"Ragdyer" wrote:

Try this:

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

With SumProduct, you *cannot* use an entire column reference (A:A).
--
HTH,

RD

--------------------------------------------------------------------------

-
Please keep all correspondence within the NewsGroup, so all may benefit !
--------------------------------------------------------------------------

-

"OVERLOAD" wrote in message
...
I want to count the number of different text values in an unsorted

column.
EXAMPLE:
I have a variety of text values in column 'A', for instance the 'city'

value
of a persons address. And I have 5000 rows of data in the spreadsheet,
random people from all over the country.
I want to know how many different cities are represented by the random

group
of people.

Is there a way to "COUNT" an array but count each unique value only

once.




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 to use an array or matrix to return text vs. numeric values Ingrid Excel Worksheet Functions 2 April 10th 05 12:51 AM
Can I count in an array based on a function? HokieLawrence Excel Worksheet Functions 2 February 12th 05 03:05 AM
Help adding text values Texas-DC_271 Excel Worksheet Functions 7 January 15th 05 11:14 PM
Stop Excel from converting text labels in CSV files to Values Just Want a Label! Excel Discussion (Misc queries) 1 January 11th 05 04:51 PM
VBA Import of text file & Array parsing of that data Dennis Excel Discussion (Misc queries) 4 November 28th 04 10:20 PM


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