Requirement:
The user has a list of values ranging from negative values to positive values, ex (-5,0,1,2,3,4,5,6).
The user wants to do find the minimum values of this list, but with a condition that when the min values is 0 to find the second min value.
Solution:
You can also use this Array* formula:
=MIN(IF(A1:A10<>0,A1:A10))
* Array Formulas (sometimes referred to as "CSE" formulas) have to be confirmed by pressing Ctrl+Shift+Enter rather than just pressing Enter
or if you have Excel 2016, you can use this normal formula:
=MINIFS(A1:A10,A1:A10,"<>0")
Obtained from the OzGrid Help Forum.
Solution provided by NBVC.
See also: Index to Excel VBA Code and Index to Excel Freebies and Lesson 1 - Excel Fundamentals and Index to how to… providing a range of solutions and Index to new resources and reference sheets
See also:
How to use match formulae: input data range based on cell value |
How to calculate the present value (PV) of a monetary amount |
How to calculate the future value (FV) of a monetary amount |
Click here to visit our Free 24/7 Excel/VBA Help Forum where there are thousands of posts you can get information from, or you can join the Forum and post your own questions.