excelNewbie22
Well-known Member
- Joined
- Aug 4, 2021
- Messages
- 534
- Office Version
- 365
- Platform
- Windows
hi!
i want to count unique values from range of four cells, which sometimes will include duplicates, c2:f2
against a range of 8 cells, c3:f4,
for the example below, in c2:f2 there's two 2's, one 3, one 4,
in c3:f4 there's two 2's, three 3's, two 4's,
the wanted result is 4
tried the udf countunique, the original, and it doesn't work with two ranges if the second one is consist of two rows,
tried a modified one, and thought it worked, until tested with 4 values and still return only 3
tried:
=SUM(IF(FREQUENCY(IFERROR(MATCH(C2:F2,C3:F4,0),""),COLUMN(C2:F2)-COLUMN(C2)+1)>0,1))
but it doesn't work with range of two rows
nothing seems to work
any help?
i want to count unique values from range of four cells, which sometimes will include duplicates, c2:f2
against a range of 8 cells, c3:f4,
for the example below, in c2:f2 there's two 2's, one 3, one 4,
in c3:f4 there's two 2's, three 3's, two 4's,
the wanted result is 4
Cell Formulas | ||
---|---|---|
Range | Formula | |
H2:H4 | H2 | =CountUnique($C$2:$F$2,C3:F4) |
I2:I4 | I2 | =SUM(IF(FREQUENCY(IFERROR(MATCH(C2:F2,C3:F4,0),""),COLUMN(C2:F2)-COLUMN(C2)+1)>0,1)) |
tried the udf countunique, the original, and it doesn't work with two ranges if the second one is consist of two rows,
Count unique distinct values in a large dataset [UDF]
This article describes how to count unique distinct values in list. What is a unique distinct list? Merge all duplicates to one distinct value and you hav
www.get-digital-help.com
tried a modified one, and thought it worked, until tested with 4 values and still return only 3
UDF for Counting Unique Text Within Date Range
Hi all, I have this wonderful User Defined Function below that counts unique text within a range. The problem is you cant specify a date range as as in COUNTIFS functions. Can this code be modified to specify date ranges? For example =CountUnique(Date_rng,">=01/09/2012",Date_rng,"
www.mrexcel.com
tried:
=SUM(IF(FREQUENCY(IFERROR(MATCH(C2:F2,C3:F4,0),""),COLUMN(C2:F2)-COLUMN(C2)+1)>0,1))
but it doesn't work with range of two rows
nothing seems to work
any help?