In this article, we will learn how to use the MAX/MIN function to replace the long IF Excel formula.
A free test data generator and API mocking tool - Mockaroo lets you create custom CSV, JSON, SQL, and Excel datasets to test and demo your software. Excel delivers marketing and telecommunications services for small and medium businesses, as well as the nation wide facilities based infrastructure supporting residential customers, large telecommunications carriers, and everyone in between. If your range contains both text and numeric values (ie: there must be at least one text and one numeric value in your range) and you want to find the last value, you could use the following formula that uses the INDEX, MAX, MATCH and REPT functions: =INDEX(range,MAX(MATCH(9.9999E+307,range),MATCH(REPT('z',255),range))). Explanation The MAX function first extracts the maximum value from the range C3:C11. In this case, that value is 849900. This number is then supplied to the MATCH function as the lookup value. The MAX function syntax has the following arguments: Number1, number2. Number1 is required, subsequent numbers are optional. 1 to 255 numbers for which you want to find the maximum value.
In simple words, while working with numbers, sometimes we need to extract numbers on the basis of given condition. Example if we need to apply the subtraction operator on numbers and don't require negative numbers as result, So force the result to zero instead of negative number. operation inside the formula executed using the operators.
Avoid Negative Numbers Using MAX
Generally, we use the IF function to avoid negative numbers. Using IF function we need to give three arguments to the function to return the result of applied operation.
But here we explained the replacement of the IF function using the MAX function.
All of these might be confusing to understand. So, let's test this formula via running it on the example shown below. Here we have some data to compute the above explained process.
As you can see from the above two values, we used IF function to extract criteria results. Now we can do the exact same operation using the MAX function as shown below.
As you can see the MAX function takes one argument with subtract operation and other is zero and the formula returns whichever is greater.
Capping Using the MIN Function
Let's say you want to multiply two numbers. If the result exceeds a limit, it should print the limit or print the result. Generally, we would go for an IF formula to do this but MIN function can do it faster and elegantly.
But here we explained the replacement of IF function using the MIN function.
Microsoft Excel For Max
All of these might be confusing to understand. So, let's test this formula via running it on the example shown below. Here we have a calculation data to compute the above explained process. We need to pay the tip ( 1.5% of total bill ) to the waiter and the max amount you can pay is $ 20.00. See the example below.
As you can see from the above two values, we used the IF function to extract tip results. Now we can do the exact same operation using the MIN function as shown below.
As you can see the MIN function takes one argument with percent operation and the other is the max amount where the formula returns whichever is smaller.
Here are some observational notes shown below.
Excel For Mac Student
- The formula only works with numbers only.
- Logic Operators like equals to ( = ), less than equal to ( <= ), greater than ( > ) or not equals to ( <> ) can be performed within function applies with number only.
- Mathematical operators like SUM ( + ), Subtract ( - ), product ( * ), division ( / ), percent ( % ), power ( ^ ) can be performed over numbers using the example.
Hope this article about how to use the MAX/MIN function to replace long IF Excel formula is explanatory. Find more articles on COUNTIFS functions here.
Excel For Mac M1
If you liked our blogs, share it with your friends on Facebook. And also you can follow us on Twitter and Facebook. We would love to hear from you, do let us know how we can improve, complement or innovate our work and make it better for you. Write to us at [email protected]
Related ArticlesFs19 amazon.
IF with AND function : Implementation of logic IF function with AND function to extract results having criteria in Excel.
Excel For Mac Tutorial
IF with OR function : Implementation of logic IF function with OR function to extract results having criteria in excel data.
How to use nested IF function : nested IF function operates on data having multiple criteria. The use of repeated IF function is nested IF excel formula.
SUMIFS using AND-OR logic : Get the sum of numbers having multiple criteria applied using logic AND-OR excel function.
Minimum value using IF function : Get the minimum value using the excel IF function and MIN function on array data.
How to use wildcards in excel : Count cells matching phrases using the wildcards in excel
Excel For Mac Power Query
Excel For Mac
50 Excel Shortcut to Increase Your Productivity : Get faster at your task. These 50 shortcuts will make you work even faster on Excel.
Excel Max Formula With Conditional Formatting
The VLOOKUP Function in Excel : This is one of the most used and popular functions of excel that is used to lookup value from different ranges and sheets.
COUNTIF in Excel 2016 : Count values with conditions using this amazing function. You don't need to filter your data to count specific values. Countif function is essential to prepare your dashboard.
How to Use SUMIF Function in Excel : This is another dashboard essential function. This helps you sum up values on specific conditions.