Combination
Round-sum journal entries with FILTER, MOD, ROUND and ABS
Flag ledger lines whose amount is an exact multiple of 1,000 (and above a minimum): ABS removes the sign, ROUND clears floating-point noise, MOD tests the multiple and FILTER lists the lines.
Functions used:FILTERMODROUNDABSExcel 2021 or later (This combination needs Excel 2021 or later)
Worked example
Ledger lines with round amounts
Scenario
For journal entry testing at Veldhuis Installatie BV you look for lines with a round amount: exact multiples of 1,0001.000 are a fraud-risk indicator, especially in manual entries.
You type the multiple in G1 and a minimum amount in G2, so small round amounts such as 3,0003.000 do not clutter the list. Credits are stored as negative amounts. FILTER needs Microsoft 365 or Excel 2021 or later.
The data
| Row | A | B | C | D | E | F | G | H | I | J | K |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Journal | Entry no. | Date | Description | Amount | Multiple | 1,0001.000 | ||||
| 2 | MEM | 25-0801 | 31 Mar 2025 | Holiday pay accrual | €18,400.00€ 18.400,00 | Minimum amount | 5,0005.000 | ||||
| 3 | INK | 25-0412 | 2 Apr 2025 | Rent invoice | €52,300.00€ 52.300,00 | ||||||
| 4 | MEM | 25-0833 | 30 Jun 2025 | Revenue correction | -€96,000.00€ -96.000,00 | MEM=FILTER(A2:E9, (MOD(ROUND(ABS(E2:E9), 2), G1)=0)*(ABS(E2:E9)>=G2), "No round-sum lines")=FILTER(A2:E9; (MOD(ROUND(ABS(E2:E9); 2); G1)=0)*(ABS(E2:E9)>=G2); "No round-sum lines") | 25-0833 | 30 Jun 2025 | Revenue correction | -€96,000.00€ -96.000,00 | |
| 5 | BNK | 25-0590 | 15 Jul 2025 | Customer receipt | €25,000.00€ 25.000,00 | BNK | 25-0590 | 15 Jul 2025 | Customer receipt | €25,000.00€ 25.000,00 | |
| 6 | MEM | 25-0845 | 15 Sep 2025 | Reclass payables | €3,000.00€ 3.000,00 | MEM | 25-0852 | 28 Nov 2025 | Rent reclass | €15,000.00€ 15.000,00 | |
| 7 | MEM | 25-0871 | 31 Dec 2025 | Bonus accrual | €41,200.00€ 41.200,00 | ||||||
| 8 | MEM | 25-0880 | 31 Dec 2025 | VAT correction | €12,500.50€ 12.500,50 | ||||||
| 9 | MEM | 25-0852 | 28 Nov 2025 | Rent reclass | €15,000.00€ 15.000,00 | ||||||
| 10 |
Swipe sideways to see all columns
Formula in F4
=FILTER(A2:E9,(MOD(ROUND(ABS(E2:E9), 2), G1)=0)*(ABS(E2:E9)>=G2), "No round-sum lines")
=FILTER(A2:E9;(MOD(ROUND(ABS(E2:E9); 2); G1)=0)*(ABS(E2:E9)>=G2); "No round-sum lines")
Result: MEM | 25-0833 | 30 Jun 2025 | Revenue correction | -€96,000.00 / BNK | 25-0590 | 15 Jul 2025 | Customer receipt | €25,000.00 / MEM | 25-0852 | 28 Nov 2025 | Rent reclass | €15,000.00MEM | 25-0833 | 30 Jun 2025 | Revenue correction | € -96.000,00 / BNK | 25-0590 | 15 Jul 2025 | Customer receipt | € 25.000,00 / MEM | 25-0852 | 28 Nov 2025 | Rent reclass | € 15.000,00
How the pieces fit together
Watch out: Always round amounts that contain cents before testing them with MOD. A computed amount can carry a tiny floating-point error, and a round amount is then missed.
The formula taken apart, from the inside out. Each part can be typed into its own cell to see what it returns.
=ROUND(ABS(E2:E9),
2) =ROUND(ABS(E2:E9);
2) ABSThe value without its sign.Used here as: numberThe value to round; a number or a cell that holds one.Read more about ABSPress Escape to closenumberThe number, cell or calculation whose sign you want removed.Amount column, 8 cellsPress Escape to closenum_digitsDecimal places to keep: 2 for cents, 0 for whole numbers, -3 for thousands.2: for cents, 0 for whole numbers, -3 for thousandsPress Escape to closeABS strips the sign and ROUND rounds the amount to two decimals. The eight amounts become 18,400, 52,300, 96,000, 25,000, 3,000, 41,200, 12,500.50 and 15,000. The -96,000 credit is now positive.
=MOD(ROUND(ABS(E2:E9),
2), G1) =MOD(ROUND(ABS(E2:E9);
2); G1) ROUND AFRONDENRounds to a number of decimal places.Used here as: numberThe number you divide; its remainder is what you get back.Read more about ROUNDPress Escape to closeABSThe value without its sign.Used here as: numberThe value to round; a number or a cell that holds one.Read more about ABSPress Escape to closenumberThe number, cell or calculation whose sign you want removed.Amount column, 8 cellsPress Escape to closenum_digitsDecimal places to keep: 2 for cents, 0 for whole numbers, -3 for thousands.2: for cents, 0 for whole numbers, -3 for thousandsPress Escape to closedivisorThe cycle length; the result lies between 0 and this, with its sign.Input cell: 1,0001.000Press Escape to closeMOD returns what is left after dividing by the multiple in
G1(1,000). The eight remainders are 400, 300, 0, 0, 0, 200, 500.50 and 0. A remainder of 0 means an exact multiple.=(MOD(ROUND(ABS(E2:E9),
2), G1)=0)*(ABS(E2:E9)>=G2) =(MOD(ROUND(ABS(E2:E9);
2); G1)=0)*(ABS(E2:E9)>=G2) ROUND AFRONDENRounds to a number of decimal places.Used here as: numberThe number you divide; its remainder is what you get back.Read more about ROUNDPress Escape to closeABSThe value without its sign.Used here as: numberThe value to round; a number or a cell that holds one.Read more about ABSPress Escape to closenumberThe number, cell or calculation whose sign you want removed.Amount column, 8 cellsPress Escape to closenum_digitsDecimal places to keep: 2 for cents, 0 for whole numbers, -3 for thousands.2: for cents, 0 for whole numbers, -3 for thousandsPress Escape to closedivisorThe cycle length; the result lies between 0 and this, with its sign.Input cell: 1,0001.000Press Escape to close=Equal toPress Escape to closeNumberLiteral valuePress Escape to close*MultipliesPress Escape to closenumberThe number, cell or calculation whose sign you want removed.Amount column, 8 cellsPress Escape to close>=Greater than or equal toPress Escape to closeReferenceInput cell: 5,0005.000Press Escape to closeThe first test is TRUE for lines 3, 4, 5 and 8 (remainder 0). The second test, amount of at least the minimum in
G2(5,000), is FALSE only for line 5 (3,000). Multiplying gives 0, 0, 1, 1, 0, 0, 0, 1: three lines are flagged.=SUMPRODUCT((MOD(ROUND(ABS(E2:E9),
2), G1)=0)*(ABS(E2:E9)>=G2)) =SUMPRODUCT((MOD(ROUND(ABS(E2:E9);
2); G1)=0)*(ABS(E2:E9)>=G2)) SUMPRODUCT SOMPRODUCTMultiplies ranges pairwise and adds the results.Read more about SUMPRODUCTPress Escape to closeMOD RESTThe remainder after division.Used here as: array1The first range or array; every other array must have the same size.Read more about MODPress Escape to closeROUND AFRONDENRounds to a number of decimal places.Used here as: numberThe number you divide; its remainder is what you get back.Read more about ROUNDPress Escape to closeABSThe value without its sign.Used here as: numberThe value to round; a number or a cell that holds one.Read more about ABSPress Escape to closenumberThe number, cell or calculation whose sign you want removed.Amount column, 8 cellsPress Escape to closenum_digitsDecimal places to keep: 2 for cents, 0 for whole numbers, -3 for thousands.2: for cents, 0 for whole numbers, -3 for thousandsPress Escape to closedivisorThe cycle length; the result lies between 0 and this, with its sign.Input cell: 1,0001.000Press Escape to close=Equal toPress Escape to closeNumberLiteral valuePress Escape to close*MultipliesPress Escape to closenumberThe number, cell or calculation whose sign you want removed.Amount column, 8 cellsPress Escape to close>=Greater than or equal toPress Escape to closeReferenceInput cell: 5,0005.000Press Escape to closeAdds up the 0s and 1s: 0 + 0 + 1 + 1 + 0 + 0 + 0 + 1 = 3. That is the number of flagged lines.
=SUMPRODUCT((MOD(ROUND(ABS(E2:E9),
2), G1)=0)*(ABS(E2:E9)>=G2)*ABS(E2:E9)) =SUMPRODUCT((MOD(ROUND(ABS(E2:E9);
2); G1)=0)*(ABS(E2:E9)>=G2)*ABS(E2:E9)) SUMPRODUCT SOMPRODUCTMultiplies ranges pairwise and adds the results.Read more about SUMPRODUCTPress Escape to closeMOD RESTThe remainder after division.Used here as: array1The first range or array; every other array must have the same size.Read more about MODPress Escape to closeROUND AFRONDENRounds to a number of decimal places.Used here as: numberThe number you divide; its remainder is what you get back.Read more about ROUNDPress Escape to closeABSThe value without its sign.Used here as: numberThe value to round; a number or a cell that holds one.Read more about ABSPress Escape to closenumberThe number, cell or calculation whose sign you want removed.Amount column, 8 cellsPress Escape to closenum_digitsDecimal places to keep: 2 for cents, 0 for whole numbers, -3 for thousands.2: for cents, 0 for whole numbers, -3 for thousandsPress Escape to closedivisorThe cycle length; the result lies between 0 and this, with its sign.Input cell: 1,0001.000Press Escape to close=Equal toPress Escape to closeNumberLiteral valuePress Escape to close*MultipliesPress Escape to closenumberThe number, cell or calculation whose sign you want removed.Amount column, 8 cellsPress Escape to close>=Greater than or equal toPress Escape to closeReferenceInput cell: 5,0005.000Press Escape to close*MultipliesPress Escape to closenumberThe number, cell or calculation whose sign you want removed.Amount column, 8 cellsPress Escape to closeMultiplies each flag by the absolute amount and adds: 96,000 + 25,000 + 15,000 = 136,000. This is the total value of the flagged lines, regardless of debit or credit.
=FILTER(A2:E9,
(MOD(ROUND(ABS(E2:E9), 2), G1)=0)*(ABS(E2:E9)>=G2), "No round-sum lines") =FILTER(A2:E9;
(MOD(ROUND(ABS(E2:E9); 2); G1)=0)*(ABS(E2:E9)>=G2); "No round-sum lines") FILTERReturns every row of a range that meets a condition.Read more about FILTERPress Escape to closearrayThe rows you want back: one column or a whole table.8 rows by 5 columnsPress Escape to closeMOD RESTThe remainder after division.Used here as: includeOne TRUE/FALSE per row, as tall as array (as wide for columns): what to keep.Read more about MODPress Escape to closeROUND AFRONDENRounds to a number of decimal places.Used here as: numberThe number you divide; its remainder is what you get back.Read more about ROUNDPress Escape to closeABSThe value without its sign.Used here as: numberThe value to round; a number or a cell that holds one.Read more about ABSPress Escape to closenumberThe number, cell or calculation whose sign you want removed.Amount column, 8 cellsPress Escape to closenum_digitsDecimal places to keep: 2 for cents, 0 for whole numbers, -3 for thousands.2: for cents, 0 for whole numbers, -3 for thousandsPress Escape to closedivisorThe cycle length; the result lies between 0 and this, with its sign.Input cell: 1,0001.000Press Escape to close=Equal toPress Escape to closeNumberLiteral valuePress Escape to close*MultipliesPress Escape to closenumberThe number, cell or calculation whose sign you want removed.Amount column, 8 cellsPress Escape to close>=Greater than or equal toPress Escape to closeReferenceInput cell: 5,0005.000Press Escape to closeif_empty (optional)What to show when no row passes; without it you get #CALC!.Press Escape to closeFILTER keeps the rows where the flag is 1: lines 3, 4 and 8 with all five columns, 3 rows by 5 columns. If no line is flagged, it shows the message instead of #CALC!.
Step by step
- ABS(E2:E9) removes the sign, and ROUND(..., 2) cleans the decimals: 18,40018.400, 52,30052.300, 96,00096.000, 25,00025.000, 3,0003.000, 41,20041.200, 12,500.5012.500,50, 15,00015.000.
- MOD of each value by
G1(1,0001.000): 18,40018.400 gives 400, 52,30052.300 gives 300, 96,00096.000 gives 0, 25,00025.000 gives 0, 3,0003.000 gives 0, 41,20041.200 gives 200, 12,500.5012.500,50 gives 500.50, 15,00015.000 gives 0. Remainder = 0 is TRUE for lines 3, 4, 5 and 8. - ABS(E2:E9)>=G2 tests against the minimum of 5,0005.000: TRUE for every line except line 5 (3,0003.000).
- Multiplying the two tests gives 0, 0, 1, 1, 0, 0, 0, 1. Line 5 drops out because it is below the minimum, even though 3,0003.000 is a multiple of 1,0001.000.
- FILTER keeps lines 3, 4 and 8: entry
25-0833(-96,00096.000),25-0590(25,00025.000) and25-0852(15,00015.000). The result spills fromF4as 3 rows by 5 columns. - Count and total with the same test inside SUMPRODUCT: 0 + 0 + 1 + 1 + 0 + 0 + 0 + 1 = 3 lines, and 96,00096.000 + 25,00025.000 + 15,00015.000 = 136,000136.000 in absolute amounts. The signed total would be -96,00096.000 + 25,00025.000 + 15,00015.000 = -56,00056.000, which hides the size of the credit.
Why it works
MOD with a divisor of 1,0001.000 returns 0 only when the amount divides by 1,0001.000 without a remainder, and ABS makes debits and credits behave the same. Multiplying two TRUE/FALSE tests works as AND, so FILTER receives one column of 0s and 1s.
Because the multiple and the minimum sit in cells, you can retest at 500 or 10,00010.000 without editing the formula.
FILTER needs Microsoft 365 or Excel 2021 or later; the count and total with SUMPRODUCT also work in older versions.
Watch out for
- Floating-point trap: a computed amount such as 4,000.104.000,10 + 4,000.204.000,20 - 0.30 shows as 8,000.008.000,00 but can be stored as 7,999.9999999999997.999,999999999999. MOD of that by 1,0001.000 returns about 999.999999999999, not 0, so a round amount is missed. ROUND(..., 2) before MOD turns it back into 8,0008.000 first.
- Leave ABS out of the minimum test and credits drop out: -96,00096.000 is not greater than or equal to 5,0005.000, so the revenue correction would be missed. MOD itself copes with negatives here, but the comparison does not.
If
G1is empty or 0, MOD divides by zero and the formula returns #DIV/0!.A round amount is an indicator, not proof: note why each flagged line is acceptable or follow it up.
Variations
=IF(AND(MOD(ROUND(ABS(E2),2), $G$1)=0, ABS(E2)>=$G$2), 1, 0)
=IF(AND(MOD(ROUND(ABS(E2);2); $G$1)=0; ABS(E2)>=$G$2); 1; 0)
Helper column for older Excel versions without FILTER: type it in L2, fill down to L9 and filter on 1. The flags are 0, 0, 1, 1, 0, 0, 0, 1 as in the main formula.
=SUMPRODUCT((MOD(ROUND(ABS(E2:E9),2), G1)=0)*(ABS(E2:E9)>=G2)*ABS(E2:E9))
=SUMPRODUCT((MOD(ROUND(ABS(E2:E9);2); G1)=0)*(ABS(E2:E9)>=G2)*ABS(E2:E9))
Only the total of the flagged lines, without listing them: 136,000136.000. It works in every Excel version.
Functions used
- FILTERReturns every row of a range that meets your condition, as a live list that spills into the cells below and updates when the data changes.
- MODReturns what is left over after dividing one number by another, which makes it the tool for anything that repeats in cycles.
- ROUNDRounds a number to a chosen number of decimal places, or to tens and hundreds when the count is negative.
- ABSReturns a number without its sign, so a shortfall and an overshoot of the same size become the same distance from zero.
Functions used
- FILTERReturns every row of a range that meets your condition, as a live list that spills into the cells below and updates when the data changes.
- MODReturns what is left over after dividing one number by another, which makes it the tool for anything that repeats in cycles.
- ROUNDRounds a number to a chosen number of decimal places, or to tens and hundreds when the count is negative.
- ABSReturns a number without its sign, so a shortfall and an overshoot of the same size become the same distance from zero.