which returns the total of items in "Red" columns for each row.
How this formula works
Normally, SUMIFS is used with data in a vertical arrangement, but it can also be used in cases where data is arranged horizontally. The trick is to make sure the sum range and criteria range are the same dimensions. In the example shown, the formula in cell I5, copied down the column is:
Notice the criteria range, B4:G4 is locked as an absolute reference to prevent changes as the formula is copied.
Totals for each color
By carefully using a combination of absolute and mixed references, you can calculate totals for each color in a summary table. Notice in the example below, we are now picking up the cell references, I4, J4, and K4 to use directly as criteria:
The formula below in cell I5, copied down and across the table is:
If you want to sum an entire column without supplying an upper or lower bound, you can use the SUM function with and the specific range syntax for entire column. In the example shown, the formula in G6 is: = SUM ( D:D ) How this formula works Excel...
To sum values in columns by matching matching column headers, you can use a formula based on the SUMPRODUCT function. In the example shown, the formula in J5 is: = SUMPRODUCT ( data * ( LEFT ( headers ) = J4 )) where "data" is the named range B5:G14...
SUMIFS is a function to sum cells that meet multiple criteria. SUMIFS can be used to sum values when adjacent cells meet criteria based on dates, numbers, and text. SUMIFS supports logical operators (>,...
Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.