This formula divides the amount in column B by the denomination in C4 (100) and discards the remainder using the INT function. The formulas in column C are simpler than those in the next several columns because this is the first denomination – we don't need to worry about previous counts.
Next in D5 we first figure out what the value of existing denomination counts with:
Here SUMPRODUCT is configured with two arrays, both configured carefully.
Array1 consists of denominations from row 4. This range is carefully constructed to be "expand" when copied across the table to the right. The first reference is absolute ($C$4) and the second reference is "mixed" (C$4) - the row is locked but the column will change, causing the range to expand.
Array2 consists of existing denomination counts from row 5, with the same approach as above. The range will expand as it's copied to the right.
The result of this SUMPRODUCT operation is the total value of existing denomination counts so far in the table. This is subtracted from the original value in column B, then divided by the "current" denomination from row 4. As before, we use INT to remove any remainder.
As the formulas in column C are copied across the table, the correct counts for each denomination are calculated.
Checking the result
If you want to check your results, add a column to the end of the table with a formula like this:
The Excel INT function returns the integer part of a decimal number by rounding down to the integer. Note that negative numbers become more negative. For example, while INT(10.8) returns 10, INT(-10.8) returns -11.
The Excel FLOOR function rounds a given number down to the nearest specified multiple. FLOOR works like the MROUND function, but FLOOR always rounds down.
Excel Formula Training
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.