ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   count unique values if 2 variables (https://www.excelbanter.com/excel-worksheet-functions/231198-count-unique-values-if-2-variables.html)

Tony7659

count unique values if 2 variables
 
I have 2 columns of data, 1 numeric (maybe with "" due to formula) and 1
text. I need to count any rows with numeric values in column 1 with the same
text values (unique records) in column 2. Any ideas? Thanks!

Tony.

T. Valko

count unique values if 2 variables
 
A1:A20 = numbers
B1:B20 = text entries

Try this array formula** :

=SUM(--(FREQUENCY(IF(ISNUMBER(A1:A20)*(B1:B20<""),MATCH( B1:B20,B1:B20,0)),ROW(B1:B20)-ROW(B1)+1)0))

--
Biff
Microsoft Excel MVP


"Tony7659" wrote in message
...
I have 2 columns of data, 1 numeric (maybe with "" due to formula) and 1
text. I need to count any rows with numeric values in column 1 with the
same
text values (unique records) in column 2. Any ideas? Thanks!

Tony.




T. Valko

count unique values if 2 variables
 
Oops!

Left out something important.

Try this array formula** :


** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.


--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
A1:A20 = numbers
B1:B20 = text entries

Try this array formula** :

=SUM(--(FREQUENCY(IF(ISNUMBER(A1:A20)*(B1:B20<""),MATCH( B1:B20,B1:B20,0)),ROW(B1:B20)-ROW(B1)+1)0))

--
Biff
Microsoft Excel MVP


"Tony7659" wrote in message
...
I have 2 columns of data, 1 numeric (maybe with "" due to formula) and 1
text. I need to count any rows with numeric values in column 1 with the
same
text values (unique records) in column 2. Any ideas? Thanks!

Tony.






Bernd P

count unique values if 2 variables
 
Hello Tony,

I suggest to use my UDF Pfreq which you can find he
www.sulprobil.com

Regards,
Bernd


All times are GMT +1. The time now is 01:48 AM.

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