Excel formula for Beginners – How to Find Minimum value if unique in Excel

 

 

(Excel examples for Beginners)

In this end-to-end excel example, you will learn – Excel formula for Beginners – How to Find Minimum value if unique in Excel.

 

Excel formula for Beginners – How to Find Minimum value if unique in Excel

Generic formula

=MIN(UNIQUE(range,0,1))

Explanation

To find the minimum unique value in a set of data, you can use the UNIQUE function together with the MIN function. In the example below, the formula in E5 is:

=MIN(UNIQUE(data,0,1))

where “data” is the named range B5:B14.

In older versions of Excel, you can use an array formula based on the MIN, IF, and COUNTIF functions as explained below.

How this formula works

The goal in this example is to return the minimum value that is unique, i.e. the minimum value that occurs only once in the data.

The UNIQUE function, new in Excel 365, will return a unique list of values from a set of data. By default, this is a list of any value that occurs one or more times in the data.

UNIQUE has an optional third argument called “exactly_once” that will limit results to values that occur once only in the source data. To enable this feature, the argument needs to be set to TRUE or 1.

Working from the inside out, the UNIQUE function is configured like this:

UNIQUE(data,0,1)

For array, we provide the named range data. For the by_col argument, we use zero (0), since we want unique values by rows, not columns. Finally, for exactly_once, we provide 1, since we want only values that occur just once in the source data.

Configured this way, UNIQUE returns the 4 values that appear only once:

{700;600;500;300} // result from unique

This array is returned directly to the MIN function, which returns the minimum value, 300, as the final result:

=MIN({700;600;500;300}) // returns 300

Array formula with COUNTIF

If you are using a version of Excel without the UNIQUE function, you can find the minimum unique value with an array formula based on the COUNTIF, MIN, and IF functions.

{=MIN(IF(COUNTIF(data,data)=1,data))}

This is an array formula and must be entered with control + shift + enter, except in Excel 365.

Working from the inside out, the COUNTIF function is used to generate a count of each value in the data like this:

COUNTIF(data,data) // count all values

Because there are 10 values in the named range data, COUNTIF returns an array of 10 results:

{2;1;1;2;1;2;2;2;1;2}

This array holds the count of each value. Next we test the array for values equal to 1:

{2;1;1;2;1;2;2;2;1;2}=1

Again, we get an array with 10 results:

{FALSE;TRUE;TRUE;FALSE;TRUE;FALSE;FALSE;FALSE;TRUE;FALSE}

Each TRUE value corresponds to a value in the source data that occurs just once. This array is delivered directly to the IF function, which uses it like a filter. Only values in data associated with TRUE make it into the array returned by IF, all other values are FALSE.

{FALSE;700;600;FALSE;500;FALSE;FALSE;FALSE;300;FALSE}

Personal Career & Learning Guide for Data Analyst, Data Engineer and Data Scientist

Applied Machine Learning & Data Science Projects and Coding Recipes for Beginners

A list of FREE programming examples together with eTutorials & eBooks @ SETScholars

95% Discount on “Projects & Recipes, tutorials, ebooks”

Projects and Coding Recipes, eTutorials and eBooks: The best All-in-One resources for Data Analyst, Data Scientist, Machine Learning Engineer and Software Developer

Topics included: Classification, Clustering, Regression, Forecasting, Algorithms, Data Structures, Data Analytics & Data Science, Deep Learning, Machine Learning, Programming Languages and Software Tools & Packages.
(Discount is valid for limited time only)

Disclaimer: The information and code presented within this recipe/tutorial is only for educational and coaching purposes for beginners and developers. Anyone can practice and apply the recipe/tutorial presented here, but the reader is taking full responsibility for his/her actions. The author (content curator) of this recipe (code / program) has made every effort to ensure the accuracy of the information was correct at time of publication. The author (content curator) does not assume and hereby disclaims any liability to any party for any loss, damage, or disruption caused by errors or omissions, whether such errors or omissions result from accident, negligence, or any other cause. The information presented here could also be found in public knowledge domains.

Learn by Coding: v-Tutorials on Applied Machine Learning and Data Science for Beginners

Please do not waste your valuable time by watching videos, rather use end-to-end (Python and R) recipes from Professional Data Scientists to practice coding, and land the most demandable jobs in the fields of Predictive analytics & AI (Machine Learning and Data Science).

The objective is to guide the developers & analysts to “Learn how to Code” for Applied AI using end-to-end coding solutions, and unlock the world of opportunities!

 

https://setscholars.net/python-example-write-a-python-program-to-get-unique-values-from-a-list/

Excel formula for Beginners – How to Count Distinct values in Excel

PostgreSQL Example – How to Count Unique Values