ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   counting unique strings (https://www.excelbanter.com/excel-discussion-misc-queries/4286-counting-unique-strings.html)

Sparky Mark

counting unique strings
 
I'm having trouble with a formula that will allow me to count the number of
unique strings in a range, however it needs to disregard any blanks in that
range. In the range g4:g1000, there are only a dozen or so values, but I'm
steadily entering the data.

In the MS Knowledgebase (article 268001), it gives this formula.

=SUM(IF(FREQUENCY(IF(LEN(G4:G1000)0,MATCH(G4:G100 0,G4:G1000,0),""),
IF(LEN(G4:G1000)0,MATCH(G4:G1000,G4:G1000,0),"")) 0,1))

However, all that's coming up is "#VALUE!". Why does this not work?

--
Sparky Mark
http://www.moglesby.karoo.net
~~~~~~~~~~~~~~~~~~~~~~~~



Max

Think its an array formula which needs to be array-entered,
viz.: press CTRL+SHIFT+ENTER, instead of just pressing ENTER

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Sparky Mark" wrote in message
...
I'm having trouble with a formula that will allow me to count the number

of
unique strings in a range, however it needs to disregard any blanks in

that
range. In the range g4:g1000, there are only a dozen or so values, but

I'm
steadily entering the data.

In the MS Knowledgebase (article 268001), it gives this formula.

=SUM(IF(FREQUENCY(IF(LEN(G4:G1000)0,MATCH(G4:G100 0,G4:G1000,0),""),
IF(LEN(G4:G1000)0,MATCH(G4:G1000,G4:G1000,0),"")) 0,1))

However, all that's coming up is "#VALUE!". Why does this not work?

--
Sparky Mark
http://www.moglesby.karoo.net
~~~~~~~~~~~~~~~~~~~~~~~~





Sparky Mark


"Max" wrote in message
...
Think its an array formula which needs to be array-entered,
viz.: press CTRL+SHIFT+ENTER, instead of just pressing ENTER


Excellent, nice one, cheers for that.

--
Sparky Mark
http://www.moglesby.karoo.net
~~~~~~~~~~~~~~~~~~~~~~~~



Max

"Sparky Mark" wrote
Excellent, nice one, cheers for that.


You're welcome, Sparky !
Thanks for feedback
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----




All times are GMT +1. The time now is 06:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com