Working With Greater Than and Less Than Comparisons in Spreadsheets
I spent last Tuesday trying to figure out why a simple conditional formatting rule wasn't triggering on a dataset with over 40,000 rows. The issue? I was using text-format cells instead of actual numbers. Standard problem, but it took me an hour to notice because the errors were buried under nested IF statements and three different comparison operators. Here is how to actually use Mayor Que Y Menor Que (greater than and less than) comparisons without losing your mind. The greater than (>) and less than (<) operators in Excel or Google Sheets are straightforward when you understand the syntax. For conditional formatting, you go to Format > Conditional formatting, choose Custom formula, and enter something like =A2>100 for greater than or =B2
50 for less than. That part is trivial. The thing nobody tells you is that these comparisons are case-sensitive for text and locale-sensitive for numbers. If your spreadsheet is using comma decimals and your comparison uses periods, everything breaks silently. I built a budget tracker last year where revenue thresholds needed to flag amounts above or below certain values. The first version used hardcoded cell references, which meant the formulas wouldn't adapt when new rows were inserted. Switching to a helper column with MATCH and INDEX made the whole system dynamic. It took about 20 minutes to restructure instead of eight hours of manual corrections later.
Common Pitfalls That Waste Hours
The biggest mistake I see is treating blank cells the same as zero. A blank cell in a greater-than comparison returns FALSE, but it also breaks AVERAGEIF and COUNTIF ranges if you are not careful. I had a report where 300 rows of data were being ignored because one column had accidental blanks scattered through it. The fix was adding an ISBLANK check alongside the comparison: =AND(A2<>"", A2>75). Another gotcha is the difference between < and <=. Beginners often mix these up and then spend an hour debugging why edge-case values are excluded from their filtered results. If you are comparing dates, remember that Excel stores them as serial numbers. A date of January 1, 2024 is actually 45292. So =A1>45292 will work, but it looks insane to anyone reading the sheet. Use DATEVALUE instead: =A1>DATEVALUE("1/1/2024").
Advanced Setup With Nested Comparisons
When you need to evaluate multiple conditions, you can nest AND, OR, and IF together. Here is a real example from a sales reporting dashboard I maintain: =IF(AND(A2>1000, B2<5), "High Volume Fast Turnaround", IF(A2>1000, "High Volume", IF(B2
5, "Fast Turnaround", "Standard"))). This handles three tiers of comparison in one cell. It is not pretty, and it takes about 45 seconds to type correctly on the first try. I recommend writing out the logic on paper first before putting it into the spreadsheet. My templates usually cut formula debugging time from two hours down to fifteen minutes. For larger datasets, consider using IFS instead of nested IFs. It is cleaner and easier to read once you get past the initial learning curve: =IFS(A2>1000, "High", A2>500, "Medium", A2
500, "Low"). Note that IFS stops at the first TRUE condition, so order matters. I learned that the hard way when a client complained their commission tiers were calculating wrong. The fix was reversing the order of evaluation to go from highest threshold to lowest.
Get the Full Details

When Comparison Logic Fails Completely
There are situations where greater than and less than comparisons simply cannot work reliably. Floating-point precision in Excel is a known issue. If you compare two calculated values that should theoretically be equal, Excel might see a tiny difference due to binary representation. =0.1+0.2>0.3 returns TRUE in some cases. The workaround is rounding: =ROUND(A1+B1,2)>C1. This adds negligible overhead and eliminates the precision error entirely. Another failure mode is regional settings mismatches in shared workbooks. I inherited a spreadsheet from a colleague in Spain where number formatting used periods as thousand separators and commas as decimals. The comparison formulas were pulling wrong values because they were reading formatted text instead of actual numeric data. Converting the entire range with Text to Columns fixed it, but it took me forty minutes to identify the root cause. If your comparisons are returning inconsistent results across regions, check your cell formats before anything else.
Quick Reference For Everyday Use
=A1>B1 — True if A1 is greater than B1 10) — True if A1 is outside the 10–100 range I keep this list pinned in a text file on my desktop. It saves me from second-guessing myself every time I start a new project. Most people figure this stuff out after making the same mistakes three or four times. I stopped making those mistakes about five years ago.
=A1
=A1<=B1 — True if A1 is less than or equal to B1
=AND(A1>10, A1<100) — True if A1 falls between 10 and 100
=OR(A1>100, A1

