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?

unique-distinct-values-in-two-columns1

Answer:

unique-distinct-values-in-two-columns21

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".

  • Share/Bookmark

Related posts:

  1. Count unique distinct values in three columns combined in excel
  2. Count unique distinct values in two columns with date criteria in excel
  3. Count unique distinct values in a column in excel
  4. Count unique and unique distinct values in a multicolumn range in excel
  5. Count unique values in two lists combined in excel
  6. Count unique values and unique distinct values in two ranges combined
  7. Count unique values and unique distinct values in three ranges combined in excel
  8. Count matching cell values in two columns in excel
  9. Extract a unique distinct list from two columns using excel 2007 array formula
  10. Count unique distinct months in excel