Google Sheets is Between: Master Between Ranges in Formulas
Learn how to check if a value lies between two numbers in Google Sheets, including inclusive/exclusive bounds, array formulas, and practical data validation. A practical guide by How To Sheets.
To decide if a value is inside a range in Google Sheets, use a simple BETWEEN-style check with AND. For example, in A2 test against lower and upper bounds with IF(AND(A2>=B2, A2<=C2), "In range", "Out of range"). This approach is inclusive by default and works for numbers, dates, and strings when properly coerced.
Understanding the Is Between Concept in Google Sheets
In this section we introduce the idea behind distinguishing values that fall between two bounds. The phrase google sheets is between captures a common data-validation pattern: checking if a value lies within a lower and upper bound. By learning the right logic you can build robust checks for scores, prices, dates, and more. This knowledge is essential for students, professionals, and small business owners who rely on Google Sheets for reliable calculations. We’ll start with a simple example and then expand to array formulas and edge cases.
=IF(AND(A2>=B2, A2<=C2), \"In range\", \"Out of range\")Parameters:
A2: the value to testB2: lower boundC2: upper bound- The formula returns a textual result; you can swap via IF to perform true/false actions.
=IF(OR(A2<B2, A2>C2), \"Out of range\", \"In range\")This variant uses the logical OR to explicitly mark out-of-range values. For large datasets, nested IFs can be replaced by array formulas and named ranges for readability. Remember that the inclusivity of the bounds matters: <= includes the boundary, while < excludes it.
Basic Formula: Using AND with Comparisons
The basic approach to check if a value falls within a range is to combine comparison operators with AND. This gives a clean, readable formula that you can fold into IF-driven logic. In practice, you test lower bound with >= and upper bound with <=, ensuring inclusivity by design. Below are practical templates you can adapt to your data.
=IF(AND(D2>=LBOUND, D2<=UBOUND), \"Yes\", \"No\")You can also invert the test to return a boolean directly:
=AND(D2>=LBOUND, D2<=UBOUND)Adapt the bounds to relative references if you’re applying the check across many rows. For example, convert to an ARRAYFORMULA for an entire column.
Handling Open-Ended Ranges and Edge Cases
Not every scenario has both bounds defined. You can model open-ended ranges using inclusive tests that ignore one side. For example, to test only a lower bound:
=IF(A2>=LOWER_BOUND, \"In range\", \"Out of range\")Or only an upper bound:
=IF(A2<=UPPER_BOUND, \"In range\", \"Out of range\")When dealing with missing bounds, you can use large sentinels to approximate infinity. A common approach uses a very small negative number and a very large positive number to avoid errors in data that lacks a bound.
Dynamic Ranges with Named Ranges and Data Validation
Named ranges simplify long formulas and improve readability. If you have named bounds like MIN_R and MAX_R, you can reuse them in your is-between tests:
=IF(AND(A2>=MIN_R, A2<=MAX_R), \"In range\", \"Out of range\")Using named ranges also helps when the bounds change frequently, as your formula stays legible and resilient. You can combine this with data validation to enforce ranges on user input, ensuring data quality at the point of entry.
// Data validation setup (UI only; formula used behind the scenes)
=AND(A2>=MIN_R, A2<=MAX_R)Array Formulas for Checking Multiple Rows at Once
If you need to check an entire column in one pass, array formulas provide a scalable solution. The classic approach uses ARRAYFORMULA with a pair of bounds:
=ARRAYFORMULA(IF((A2:A>=B2:B) * (A2:A<=C2:C), \"In range\", \"Out of range\"))This returns a corresponding In range / Out of range result for each row. You can adapt to include text, boolean, or numeric indicators. Another variation uses FILTER to extract only in-range rows:
=FILTER(A2:A, (A2:A>=B2:B) * (A2:A<=C2:C))Array formulas require careful handling of blank rows to avoid unintended results; wrap tests with ISBLANK as needed.
Practical Examples: Grade Boundaries and Price Brackets
Consider a grading scheme where scores 60–100 are passing. A simple is-between test can drive dynamic feedback:
=IF(AND(SCORE>=60, SCORE<=100), \"Passing\", \"Failing\")For price brackets, you might classify sales into tiers based on a range test:
=IF(AND(PRICE>=0, PRICE<=99.99), \"Budget\", IF(PRICE<=199.99, \"Standard\", \"Premium\"))These practical patterns translate directly into dashboards, reports, and live data checks. When used with ARRAYFORMULA, you can extend them across thousands of rows with minimal maintenance.
Common Pitfalls and How To Debug
Between-range checks seem straightforward, but small mistakes break everything. Common issues include incorrect operator order, mixing integer and text comparisons, or failing to account for blank cells. Troubleshoot with ISNUMBER to ensure numeric tests, and test against a few controlled values first. Splitting complex tests into helper cells improves readability and reduces error risk.
=IF(ISNUMBER(A2), IF(AND(A2>=B2, A2<=C2), \"In range\", \"Out of range\"), \"Not a number\")Another tip is to lock references with $ in copy-down formulas so that bounds remain stable as you drag across rows. Finally, avoid mixing date values with numeric comparisons without normalizing formats.
Advanced Variations: Between with Dates and Text
Dates are stored as numbers in Sheets, so you can apply the same BETWEEN logic to date values. Convert textual dates with DATEVALUE if needed, then compare:
=IF(AND(DateCell>=DATEVALUE("2026-01-01"), DateCell<=DATEVALUE("2026-12-31")), \"Current year\", \"Old year\")Text requires careful coercion; you may need to wrap text in VALUE or use numerical proxies for comparison. Consider locale settings for date formats when sharing sheets internationally. With careful normalization, the is-between approach scales to dates, timestamps, and textual numerics across complex datasets.
Steps
Estimated time: 20-30 minutes
- 1
Define the problem and bounds
Clarify the lower and upper bounds you want to test against. Decide if the bounds are inclusive or exclusive for your scenario.
Tip: Document the exact meaning of your bounds to avoid misinterpretation later. - 2
Create a test dataset
Set up sample data that includes values inside, on the boundary, and outside the range to validate your formula.
Tip: Include edge cases like blank cells and non-numeric entries. - 3
Write the base formula
Start with a simple IF(AND(...)) structure and confirm it returns expected results.
Tip: Use a helper cell to show the boolean result before adding text. - 4
Extend to arrays
If needed, convert to ARRAYFORMULA to apply tests down a whole column.
Tip: Be mindful of blank rows and dynamic named ranges. - 5
Validate with dates and text
Adapt the same pattern for dates or textual numerics, normalizing formats as needed.
Tip: Always verify locale-specific date formats. - 6
Deploy and monitor
Apply the formula to your live sheet and watch for unexpected edge cases.
Tip: Add a small note in the sheet explaining what is considered in-range.
Prerequisites
Required
- Required
- Updated web browser (Chrome recommended) with JavaScript enabledRequired
- Basic knowledge of IF and AND functions in SheetsRequired
Optional
- Optional
- Familiarity with named ranges or data validation (optional)Optional
Keyboard Shortcuts
| Action | Shortcut |
|---|---|
| CopyCopy selected cells | Ctrl+C |
| PastePaste into selected cells | Ctrl+V |
| Fill downFill content from above downwards | Ctrl+D |
| Paste values onlyPaste without formulas | Ctrl+⇧+V |
| FindSearch within sheet | Ctrl+F |
FAQ
What does it mean for a value to be 'between' two bounds in Sheets?
It means the value lies within the inclusive range defined by the lower and upper bounds. Use AND to test both conditions (>= lower and <= upper).
A value is between bounds when it meets both conditions: above or equal to the lower bound and below or equal to the upper bound.
Can I use BETWEEN logic for dates and times?
Yes. Dates are stored as numbers in Sheets. Convert textual dates with DATEVALUE if needed, then apply the same >= and <= checks to compare.
Absolutely—dates work the same as numbers once they're in a comparable form.
Is there a built-in BETWEEN function in Google Sheets?
There is no dedicated BETWEEN function. Use AND with comparisons to implement the logic; you can wrap it in IF for messaging or actions.
There isn’t a built-in BETWEEN function; you combine comparisons with AND instead.
How do I apply the test across a whole column without dragging formulas?
Use ARRAYFORMULA to apply the test down an entire column, returning results for each row without manual copying.
Use an ARRAYFORMULA so a single formula handles the entire column.
What are common pitfalls when testing ranges?
Mixing data types, forgetting to account for blank cells, and not deciding inclusive vs exclusive bounds are frequent mistakes.
Be mindful of types, blanks, and boundary inclusivity to avoid surprises.
The Essentials
- Check bounds with AND for clear, readable tests
- Use ARRAYFORMULA for large datasets
- Handle edge cases and blank cells explicitly
- Dates follow the same logic when normalized to numeric values
