Google Sheets GT Function: How to Use It
In this article
The GT function in Google Sheets is a logical comparison that returns TRUE if the first value is strictly greater than the second, and FALSE otherwise. It is the functional equivalent of the > operator, so =GT(A1,B1) gives the same result as =A1>B1. Use it when you want a readable, consistent comparison inside IF, FILTER, COUNTIF-style logic, or conditional formatting rules. Nothing needs to be installed or enabled — GT is a built-in function available in every Google Sheets account, on desktop and in the mobile app.
What You'll Need
- A Google account with access to Google Sheets (free with any Google account).
- A spreadsheet with at least two values to compare — numbers, dates, or text.
- Basic familiarity with entering formulas (starting with =) and referencing cells like A1 or B1.
Step-by-Step
- Open your spreadsheet. Go to sheets.google.com, sign in, and open the file you want to work in, or create a blank spreadsheet with File > New > Spreadsheet. Menu labels can differ slightly by version, device, or region.
- Put two values in separate cells. For example, type 10 in cell A1 and 5 in cell B1. GT needs two arguments: the value on the left and the value on the right.
- Click an empty cell for the result — say C1 — and type the formula:
=GT(A1,B1). Press Enter. The cell should show TRUE because 10 is greater than 5. - Test the reverse. In another cell, type
=GT(B1,A1). It returns FALSE, because 5 is not greater than 10. This confirms GT is directional: it only checks whether the first argument is larger. - Try equal values. Change B1 to 10. Both formulas now return FALSE, because GT is strictly greater than — it does not treat equal values as TRUE. If you want greater than or equal to, use GTE instead.
- Compare text. Type Apple in A2 and Banana in B2, then
=GT(A2,B2). Text comparisons are alphabetical (case-insensitive in practice), so Apple is not greater than Banana and the result is FALSE. This is useful for sorting checks but can surprise you — see Common Mistakes. - Compare dates. Enter 2024-01-15 in A3 and 2024-01-10 in B3, then
=GT(A3,B3). Dates stored as real dates compare chronologically, so the result is TRUE. If your dates are stored as text, GT may compare them as strings instead — convert them with DATEVALUE first. - Wrap GT in IF for readable output. Instead of raw TRUE/FALSE, use
=IF(GT(A1,B1),"Above target","At or below target"). This is the most common real-world use: flagging values against a threshold. - Use GT inside array formulas. To compare an entire column at once, try
=ARRAYFORMULA(GT(A1:A10,B1:B10)). Each row is compared independently and you get a column of TRUE/FALSE results. - Apply GT to conditional formatting. Select your range, open Format > Conditional formatting, choose Custom formula is, and enter a rule like
=GT(A1,100). Note the relative reference (A1, not $A$1) so the rule shifts down the column. Values greater than 100 will highlight. - Copy the formula down. Drag the fill handle or copy and paste. Relative references adjust automatically, so GT(A2,B2), GT(A3,B3), and so on are created for you.
- Check the result type. GT always returns TRUE or FALSE — never a number or text. If you need 1/0 for math, wrap it:
=--GT(A1,B1)or=IF(GT(A1,B1),1,0).
Common Mistakes
- Expecting TRUE for equal values. GT is strictly greater than. Use GTE for greater than or equal to.
- Comparing text that looks numeric. If A1 contains "10" as text and B1 contains 5 as a number, Sheets may coerce or may compare as text depending on context. Use VALUE(A1) to force a number.
- Forgetting that text comparison is alphabetical, not length-based. "Zebra" is greater than "Apple" even though it is shorter. GT on text follows sort order, not word size.
- Mixing date formats. A date stored as text (for example, "15/01/2024" typed with an apostrophe) will not compare chronologically. Convert it to a real date first.
- Using absolute references in conditional formatting. A rule like =GT($A$1,100) applies the same comparison to every cell. Use relative references so the rule moves with each row.
- Assuming GT works across ranges without ARRAYFORMULA. GT compares single values. For ranges, wrap it in ARRAYFORMULA or use SUMPRODUCT-style logic.
Tips
- GT is interchangeable with the > operator in most formulas, but GT reads more clearly in complex nested IFs and in documentation for teammates.
- Combine GT with AND or OR for multi-condition checks:
=AND(GT(A1,0),GT(B1,0)). - For counting how many values exceed a threshold, use
=COUNTIF(A1:A10,">100")or=SUMPRODUCT(--GT(A1:A10,100)). Both work; COUNTIF is usually faster on large ranges. - GT returns a Boolean, which Sheets treats as TRUE/FALSE. In arithmetic, TRUE becomes 1 and FALSE becomes 0, so you can sum GT results directly.
- Use GT in data validation custom formulas to allow only values above a minimum.
- If you are comparing against a fixed threshold, put the threshold in its own cell and reference it (for example, GT(A1,$D$1)) so you can change it once without editing every formula.
Troubleshooting
- Formula returns #NAME?. Check spelling: GT, not GreatThan or GT(). Also confirm you used a comma between arguments — some locales use semicolons instead.
- Formula returns #VALUE!. One argument is an error or an incompatible type. Check the source cells for text in a numeric comparison or an error like #N/A.
- Result is always FALSE. Confirm the order of arguments — GT(A1,B1) checks A1 > B1. Also check whether the values are text vs numbers; a leading apostrophe forces text.
- Conditional formatting does not highlight. Verify the range, the relative reference, and that the rule is set to Custom formula is. Preview the rule in the sidebar before saving.
- ARRAYFORMULA gives unexpected results. Make sure both ranges are the same size. Mismatched ranges can produce errors or spill incorrectly.
- Dates compare wrong. Select the date cells and check Format > Number > Date. If they show as plain text, re-enter them or use DATEVALUE.
Frequently Asked Questions
What is the difference between GT and GTE?
GT returns TRUE only when the first value is strictly greater. GTE returns TRUE when it is greater than or equal to. Use GTE when equality should count as a pass.
Can GT compare text?
Yes. Text is compared alphabetically (sort order), case-insensitively in practice. "Banana" is greater than "Apple" because B comes after A.
Does GT work with dates?
Yes, if the dates are stored as real date values. Text-formatted dates compare as strings and may give wrong results.
Can I use GT across a whole column?
Yes, with ARRAYFORMULA: =ARRAYFORMULA(GT(A1:A10,B1:B10)). Without it, GT compares only single cells.
Why does GT return FALSE when the values look equal?
GT is strictly greater than, so equal values return FALSE. Use GTE if equality should return TRUE.
Is GT available in the Google Sheets mobile app?
Yes. GT is a built-in function and works the same in the Android and iOS Sheets apps, though the formula bar and menu layout differ from desktop.