Stockertim Dictionary · Technology
Logical test
Also called logical tests, logical expression, condition, Boolean test
In short
A comparison inside a formula, such as an amount being at least 300, that evaluates to TRUE or FALSE and so decides which result a function like IF returns.
- Beginner
- Concept
- Checked
In detail
A logical test compares two things with an operator and returns one of two values, TRUE or FALSE. The six comparison operators are = (equal to), <> (not equal to), > (greater than), < (less than), >= (greater than or equal to) and <= (less than or equal to). The first argument of the IF function is a logical test, as in =IF(B2>=300,"Bonus","None"), and so are the conditions in filters and conditional formatting.
Tests can be combined. AND returns TRUE only when every condition holds, OR when at least one does, and NOT reverses a result. A test such as =AND(B2>=300,C2="North") checks two columns at once. Because TRUE counts as 1 and FALSE as 0 in arithmetic, a test can also be multiplied by a number, which is how some formulas count or sum matching rows without IF.
The wording of the rule matters more than the syntax. "Over 300" and "300 or more" differ only for a value of exactly 300, yet one needs > and the other >=. Ambiguous instructions are the usual reason a correct-looking formula pays the wrong people at a threshold.
Comparisons also behave unexpectedly with data of the wrong type. In Excel, text comparisons ignore case, so "north" equals "NORTH", but a stray space makes two labels differ. A number stored as text is not treated as a number in a comparison, so a test on such a cell can fail for every row while raising no error.
Worked example
A furniture shop in Abuja pays a bonus flag on sales of 300 or more. Column B holds sale amounts and C2 holds =B2>=300.
- B2 holds 450, so the test returns TRUE
- B3 holds 300; with >= the test returns TRUE, but with > it would return FALSE
- B4 holds 120, so the test returns FALSE
The choice between > and >= decides the outcome only for the boundary value of exactly 300.
In practice
Logical tests drive flags for overdue invoices, credit limits, stock below a reorder level and exceptions in reconciliations. Clear rule wording, with "or more" or "below" written out, prevents disagreements later.
Watch out
- Numbers stored as text, extra spaces and mixed date formats make comparisons fail quietly.
- Check every rule at its exact threshold, where > and >= give different answers.
Learn it properly
- IF, SUMIFS and COUNTIFS15 min lesson Free course: Excel and spreadsheets with AI
- Special category data and sensitive information15 min lesson Free course: Human resources and data privacy
- SQL basics: SELECT, WHERE and ORDER BY15 min lesson Free course: Data skills: SQL and Python basics
- Motivation at work15 min lesson Free course: Leadership and people management
- Rules-based automation and where AI fits15 min lesson Free course: AI agents and automation basics
Official sources
- The AQuA Book: guidance on producing quality analysis for government · HM Treasury
- The Government Data Quality Framework · UK Government Data Quality Hub
Facts last checked on 9 November 2026.
Education, not advice: the Stockertim Dictionary explains what terms mean. It never recommends buying or selling anything.