Question: I want a unique list to be created from a column where an adjacent

unique-list-with-criteria1

column has cell values between 2 and 8?

Answer:

To the right is a picture of the list I will be working with. I created named ranges, List_category (A2:A11) and a named range for the start cell of the list, List_category_start (A2).
List
_value (A2:A11) and a named range for the start cell of the list, List_value_start (A2).

This formula is long. I am sure it can be done shorter. Formula in E5:E14:

=IF(COUNT(IF(IF(ISERROR(MATCH(IF(($F$1<List_value)*($F$2>List_value), List_category, ), IF(($F$1<List_value)*($F$2>List_value), List_category, ""), 0)), "", MATCH(IF(($F$1<List_value)*($F$2>List_value), List_category, ), IF(($F$1<List_value)*($F$2>List_value), List_category, ""), 0))=(ROW(List_category)-ROW(List_category_start)+1), MATCH(IF(($F$1<List_value)*($F$2>List_value), List_category, ), IF(($F$1<List_value)*($F$2>List_value), List_category, ""), 0), ""))>=(ROW(List_category)-ROW(List_category_start)+1), INDEX(List_category, SMALL(IF(IF(ISERROR(MATCH(IF(($F$1<List_value)*($F$2>List_value), List_category, ), IF(($F$1<List_value)*($F$2>List_value), List_category, ""), 0)), "", MATCH(IF(($F$1<List_value)*($F$2>List_value), List_category, ), IF(($F$1<List_value)*($F$2>List_value), List_category, ""), 0))=(ROW(List_category)-ROW(List_category_start)+1), MATCH(IF(($F$1<List_value)*($F$2>List_value), List_category, ), IF(($F$1<List_value)*($F$2>List_value), List_category, ""), 0), ""), (ROW(List_category)-ROW(List_category_start)+1))), "") + Ctrl + Shift+ Enter

Yellow cells are user input cells. See picture below.

unique-list-with-criteria21


Download excel sample file for this tutorial.
unique-list-with-criteria.xls
(Excel 97-2003 Workbook *.xls)

Functions in this article:

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

INDEX(array,row_num,[column_num])
Returns a value or reference of the cell at the intersection of a particular row and column, in a given range

SMALL(array,k) returns the k-th smallest row number in this data set.

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

COUNT(value1;[value2])
Counts the number of cells in a range that contain numbers

ISERROR(value)
Checks whether a value is an error and returns TRUE or FALSE

This blog article is one out of thirteen articles on the same subject "unique".

  • Share/Bookmark

Related posts:

  1. Create a list of distinct values from a list where an adjacent cell value meets a criteria in excel
  2. How to create a unique distinct list where other columns meet two criteria
  3. Create a list of duplicates where adjacent cell value meets a condition in excel
  4. Unique list to be created from a column where an adjacent column has text cell values
  5. Create and sort distinct list by adjacent cell value size
  6. Create a unique distinct list from a date range in excel
  7. Unique distinct list from a column sorted A to Z using array formula in excel
  8. Unique distinct list sorted based on occurrance in a column in excel
  9. Filter a column and create a new unique list sorted from A to Z using array formula in excel
  10. Create a unique distinct list and sort by occurrances from large to small