Count unique distinct values in two columns in excel
Question: I have values in two not adjacent columns. I want to know how many unique distinct values there are in those two columns combined?
Answer:
Formula in C12:
=SUM(IF(MATCH(List1, List1, 0)>=(ROW(List1)-MIN(ROW(List1))+1), 1, 0))+SUM(IF(ISERROR(MATCH(List2, List1, 0)>=(ROW(List2)-MIN(ROW(List2))+1)), IF(MATCH(List2, List2, 0)>=(ROW(List2)-MIN(ROW(List2))+1), 1, 0), 0)) + CTRL + SHIFT + ENTER
Named ranges
List1 (A3:A8)
List2 (C4:C9)
What is named ranges?
How to customize the formula to your excel workbook
Change the named ranges.
Download excel example file
count-unique-distinct-values-in-two-columns.xls
(Excel 97-2003 Workbook *.xls)
Functions used in this blog post:
COUNTIF(range,criteria)
Counts the number of cells within a range that meet the given condition
IF(logical_test;[value_if:true];[value_if_false])
Checks whether a condition is met, and returns one value if TRUE, and another value if FALSE
ROW(reference) returns the rownumber of a reference
MATCH(lookup_value;lookup_array; [match_type])
Returns the relative position of an item in an array that matches a specified value
SUM(number1,[number2],)
Adds all the numbers in a range of cells
MIN(number1,[number2])
Returns the smallest number in a set of values. Ignores logical values and text
This blog article is one out of twelve articles on the same subject "count unique and unique distinct".
- Count unique values in a column in excel
- Count unique distinct values in two columns in excel
- Count unique distinct values in three columns combined in excel
- Count unique and unique distinct values in a multicolumn range in excel
- Count unique values and unique distinct values in two ranges combined
- Count unique values and unique distinct values in three ranges combined in excel
- How to count unique combined column values
- How to count unique distinct records in a date range
- Count unique distinct records in a date range and a numeric range in excel
- Count unique distinct values in two columns with date criteria in excel
- Count unique distinct months in excel
- Count duplicate distinct values in a column in excel
Related posts:
- Count unique distinct values in three columns combined in excel
- Count unique distinct values in two columns with date criteria in excel
- Count unique distinct values in a column in excel
- Count unique and unique distinct values in a multicolumn range in excel
- Count unique values in two lists combined in excel
- Count unique values and unique distinct values in two ranges combined
- Count unique values and unique distinct values in three ranges combined in excel
- Count matching cell values in two columns in excel
- Extract a unique distinct list from two columns using excel 2007 array formula
- Count unique distinct months in excel




Leave a Reply