Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.
Last reviewed:
=INT(A2/B2)+(ROW(A1)<=MOD(A2,B2))Computed by a real spreadsheet engine on the sample data below.
| Total | Rows |
| 100 | 7 |
| Dist | |
| =INT($A$2/$B$2)+(ROW(A1)<=MOD($A$2,$B$2)) | |
| =INT($A$2/$B$2)+(ROW(A2)<=MOD($A$2,$B$2)) | |
| =INT($A$2/$B$2)+(ROW(A3)<=MOD($A$2,$B$2)) |
=INT(A2/B2)+(ROW(A1)<=MOD(A2,B2))→15
Edit the grid or formula, then run it through a real spreadsheet engine — no signup.
Sample data — click any cell to edit
Working on a sheet you inherited? Run the Auditor on the whole file first — it flags every #REF!, #N/A, broken column pattern, and inconsistent formula in seconds, free, no signup.
A2/B2 produces a repeating decimal when A2 is not evenly divisible. Summing those decimals will drift from the exact total due to floating-point representation. The INT + MOD approach guarantees the parts sum to A2.
Put the row count in a reference cell (like B2) and use that cell in the formula. Change B2 and copy the formula block to match — or use SEQUENCE to generate the rows dynamically.
Yes. QUOTIENT(A2,B2) is equivalent to INT(A2/B2) for positive integers and is slightly more readable. For negative numbers they differ, but distribution totals are usually positive.
Combine two columns into one with the & operator — perfect for joining first and last names into a full name.
How-toAutomatically generate sequential invoice numbers with a prefix and zero-padded counter using TEXT and ROW in Excel and Google Sheets.
How-toAssign sequential row numbers that restart for each group using COUNTIF with a mixed reference in Excel and Google Sheets.
How-toDelete empty rows quickly by filtering for blanks and deleting visible rows, or use Go To Special in Excel for a one-click approach.
How-toFlip rows and columns using the TRANSPOSE function or Paste Special to convert horizontal data to vertical and vice versa.
How-toMerge values from several columns into one cell using the ampersand operator or CONCAT/TEXTJOIN for delimited output.
Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.
Last reviewed: