![]() ![]() ![]() The N function changes TRUE to 1 and FALSE to 0. The solution in this case is =SUMPRODUCT(N(A1:A37=”Subtotal”),B1:B37). That’s pretty cool too! But this could also lead to an error if somewhere in column A the word Subtotal were misspelled, or contained a space at the end (“Subtotal ”)!Įach array must be a numeric array. OK, what is SUMIF? It’s a built-in Excel function which works like this: Wherever the first range (A1:A37) contains the word “Subtotal”, add the values from the 2nd range (the 3rd parameter). This doesn’t look much shorter, but it’s pretty much the same size no matter how many cells are involved. One down side to this technique is that it won’t work on a range which is horizontal, only vertical, as this one is. Wow! That’s cool! Excel “finds” all the other Sum formulas and picks out the correct cells! Not likely to produce an error! But there’s no hunting for the correct cells to use. While the cell B38 is selected, press Alt/= (that is, hold the Alt key down and press the = sign). The first way is probably the easiest, but the formula is perhaps just as long. In this article I’ll describe a few alternative ways to do this, leaving the best for last! It does work, producing the correct answer, but it’s tedious to do and certainly subject to errors because you might click the wrong cell. I’ve seen formulas like this many many times, and often a lot longer because the list is longer. ![]() How many of you would use the formula =B3+B9+B14+B20+B25+B32+B37 to solve the problem? The formula in cell B9, for example, is =SUM(B4:B8). But what is the formula which goes there? Notice that there are several subtotals in the list. Suppose you have a worksheet which looks something like this:Ĭlearly, what’s needed is the grand total in cell B38. This method is also applicable to horizontal ranges, making it a versatile solution for different worksheet setups.This works because each subtotal is a sum of individual values, effectively counting each value twice. The simplest and most efficient method to calculate totals in a list, including subtotals, is to sum all the values and divide by 2.It requires numeric arrays and can be used with the N function to convert TRUE/FALSE values to 1/0. SUMPRODUCT is another Excel function that multiplies ranges or arrays together and returns the sum of the products.However, it can lead to errors if the criterion is misspelled or incorrectly formatted. SUMIF is a built-in Excel function that calculates the sum of the values in a range that meet a specified criterion.The Alt/= shortcut in Excel can automatically find all other SUM formulas and calculate the total, making it less likely to produce errors.Basic Excel functions such as SUM can be used to calculate totals in a list, but this method can be prone to errors and tedious if the list is long.Learn different methods to calculate totals, including the use of SUMIF and SUMPRODUCT functions, and discover the most efficient way to avoid errors and long formulas. Master Excel formulas and shortcuts with this comprehensive guide on managing worksheets. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |