MOD / EXACT
MOD returns what's left over after division; EXACT checks whether two bits of text match exactly, case included.
MOD is the classic "is this even or odd" or "every nth item" building block: MOD(n,2)=0 identifies an even number, and MOD(row,5)=0 flags every 5th row in a list. EXACT is the one text-comparison function in Excel that actually cares about letter case: a plain = comparison between "ABC" and "abc" treats them as equal, while EXACT("ABC","abc") correctly returns FALSE, which matters anywhere a case-only difference is the whole point of the check, like verifying a retyped password or a case-sensitive product code.
Syntax
| Argument | Description |
|---|---|
| number, divisor | MOD: Required. The value being divided, and what it's divided by. The result is the remainder. |
| text1, text2 | EXACT: Required. The two values to compare: EXACT returns TRUE only if they match in every character, including uppercase vs. lowercase. |
A real example: catching a case-only mismatch a plain comparison would miss
A product code entered by a customer, checked against the code on file:
"SKU-100" and "sku-100" differ only in case; a plain = comparison between them would say TRUE, treating them as the same value, while EXACT correctly flags them as different, which matters whenever case genuinely carries meaning in the data.
Worked examples
| A | |
|---|---|
| 1 | Item # |
| 2 | 10 |
(0 means A2 is exactly divisible by 5)
| A | B | |
|---|---|---|
| 1 | Entered | On file |
| 2 | SKU-100 | sku-100 |
(the two differ only in case, so a plain = comparison would say TRUE, but EXACT correctly says FALSE)
Common mistakes
- Using a plain = comparison when case genuinely matters (a password retype, a case-sensitive code). = ignores case; only EXACT catches a case-only difference.
- Forgetting that MOD's result keeps the sign of the dividend with a negative number, which can be surprising if an "always zero or positive" remainder was assumed.
- Checking MOD(n,2)=1 for "odd" and getting it wrong with a negative number. MOD(-3,2) returns -1 in some conventions, not 1; testing <>0 for "not evenly divisible" sidesteps the question entirely when only evenness matters.
Related functions
Try it yourself
A free, graded practice exercise using this exact function: instant feedback, no signup required.
Practice MOD / EXACT →