An essential skill any Excel user should know is how to determine the range of values in Excel. Most businesses don’t have time to waste sorting through rows and rows in Excel in order to find the highest and lowest values of revenue, sales, or other information. The difference between the highest and lowest figures in a group of data – the range – can be valuable in accurate decision making, budgeting, and forecasting.
Let’s pretend you are the purchasing manager for Revelation, Inc., a small business that distributes computers. You can bid bulk pricing for raw materials that will significantly improve Revelation’s profits. The sooner you can purchase materials, the better, because the price increases the closer they are to the ship date. You can use sales data from the prior fiscal year to budget for raw materials, and the range can help you forecast next year’s sales based on this year’s results. You can use the average sales per month for insight into what raw materials you should need when. Identifying that specific gap is also great for setting performance standards, because you can figure out how you perform against other months.
Because Excel offers multiple ways to write range formulas to suit your individual needs, here are three range formula options to get you started!
1. Minimum and Maximum Formulas
Revelation keeps a spreadsheet with information including the state, model, number of units, unit price, and total revenue for each product per state. The past year’s product sales are arranged as follows:
You need to find which products have the smallest and largest demand. This is a small list, but if you sell or resell a lot of product, the following formula can be invaluable. You can find minimum and maximum units easily with the MIN() and MAX() functions.
- In cell B15, type “=MIN(C2:C13)”.
- In cell B16, type “=MAX(C2:C13)”.
You now have a quick report of the fewest number of units sold in a state (102 tablets in Iowa) and the most sold (450 laptops in Illinois).
2. Top k and Bottom k Formulas
Suppose you’re interested in more data – not just the lowest selling item but the three lowest. You can find these with the SMALL() function. To use SMALL(), you’ll need two parameters:
- The same range or list of values as you used for MIN().
Note: If you are using multiple values instead of a single continuous range, you’ll need to place each set in parentheses.
- The value k, which is the desired position from the bottom of the list. If you’re looking for the smallest value, then k = 1. To find the second smallest value, k = 2, etc.
To find the largest three values, use the LARGE() function with the same parameters as SMALL().
Note that SMALL() with k = 1 produces exactly the same result as MIN(). Similarly, LARGE() with k = 1 yields the same as MAX().
3. Conditional Minimum and Maximum Formulas
In some situations, you might need a minimum value that meets specific criteria. For example, you might want to know the fewest units sold for the spring quarter duration or for a specific product type.
Excel provides SUMIF(), COUNTIF(), and other helpful conditional formulas. Unfortunately, there is no MINIF() or MAXIF(), but you can create the same effect with a slightly more complicated method called an array formula. An array formula evaluates a range of cells instead of a single cell.
Typically an IF() formula tests the truth value of a single cell, but as an array formula, we can force it to evaluate each cell in a range. With an array formula you will get an error if you just press enter – #VALUE!. Remember to press CTRL, SHIFT, and ENTER after you finish your array formula.
Let’s find the minimum value for desktops. First, type the matching value (desktop) into the cell you compare your function to. If you are looking for desktop values, then type “desktop” in B18. The formula below will compare that cell reference to the range you are testing. Nest the MIN() and IF() statements as follows: “=MIN(IF(B2:B13=B18,C2:C13))” and press <CTRL>-<SHIFT>-<ENTER>.
The three formulas in rows 18, 19, and 20 calculate the minimum numbers of desktops, laptops, and tablets sold. You can write identical formulas with MAX() to find the greatest number of each product sold.
Now you can use three different methods (Minimum and Maximum Formulas, Top k and Bottom k Formulas, Conditional Minimum and Maximum Formulas) to find the range of values in any data set.