Your formula:
=IFS(
COUNTIF(UNIQUE("⚠️ Duplicated Period Errors"!B7:B), A10), "Duplicated",
COUNTIF(UNIQUE("⚠️ Missing Period Errors"!B7:B), A10), "Missing",
COUNTIF(UNIQUE("⚠️ Not Fully Paid Errors"!B7:B), A10), "Not paid",
TRUE, "Not Fully Paid"
)
is almost correct in structure, but it fails due to a common issue in Excel formulas: the use of sheet names with special characters like ⚠️.
❌ Problem: Sheet Name Contains Special Characters (Emoji)
Sheet names like:
"⚠️ Duplicated Period Errors"
"⚠️ Missing Period Errors"
"⚠️ Not Fully Paid Errors"
contain an emoji (⚠️) at the start. In Excel, when referencing sheets that have spaces or special characters (including emojis), you must enclose the sheet name in single quotes ', not just double quotes.
So this is invalid:
"⚠️ Duplicated Period Errors"!B7:B
And this is correct:
'⚠️ Duplicated Period Errors'!B7:B
✅ Corrected Formula
Here's your corrected formula:
=IFS(
COUNTIF(UNIQUE('⚠️ Duplicated Period Errors'!B7:B), A10), "Duplicated",
COUNTIF(UNIQUE('⚠️ Missing Period Errors'!B7:B), A10), "Missing",
COUNTIF(UNIQUE('⚠️ Not Fully Paid Errors'!B7:B), A10), "Not paid",
TRUE, "Not Fully Paid"
)
🧠 Explanation of How It Works
UNIQUE(...!B7:B) gets the list of unique values from column B on each error sheet.
COUNTIF(..., A10) checks if the value in A10 exists in that unique list.
- If it does,
COUNTIF returns a number > 0 → IFS evaluates this as TRUE.
IFS will return the first condition that evaluates to TRUE.
✅ Optional Tip – Performance Optimization
Using UNIQUE() inside every COUNTIF may be inefficient, especially for large ranges. You can simplify it using:
=IFS(
COUNTIF('⚠️ Duplicated Period Errors'!B7:B, A10) > 0, "Duplicated",
COUNTIF('⚠️ Missing Period Errors'!B7:B, A10) > 0, "Missing",
COUNTIF('⚠️ Not Fully Paid Errors'!B7:B, A10) > 0, "Not paid",
TRUE, "Not Fully Paid"
)
This avoids calling UNIQUE() unnecessarily — Excel's COUNTIF already counts occurrences across the full range.
Let me know if you'd like help turning this into a more dynamic or named-range-based solution!