---
title: "Check a value is within limits | PracticeExcel"
description: "Practice AND inside IF in a live spreadsheet: check that each measurement lies between its minimum and maximum."
canonical_url: "https://practiceexcelonline.com/practice/logical/and-between-two-limits"
locale: en
meta:
  "og:description": "Practice AND inside IF in a live spreadsheet: check that each measurement lies between its minimum and maximum."
  "og:image": "https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_Check%2Ba%2Bvalue%2Bis%2Bwithin%2Blimits%2Cdescription_~UHJhY3RpY2UgQU5EIGluc2lkZSBJRiBpbiBhIGxpdmUgc3ByZWFkc2hlZXQ6IGNoZWNrIHRoYXQgZWFjaCBtZWFzdXJlbWVudCBsaWVzIGJldHdlZW4gaXRzIG1pbmltdW0gYW5kIG1heGltdW0u%2Ceyebrow_AND%2Band%2BOR%2Csite_practiceexcel%2Cprops_eyJncmlkIjp7ImNvbHMiOlsiQSIsIkIiLCJDIiwiRSJdLCJyb3dzIjpbeyJuIjoxLCJjZWxscyI6WyJQYXJ0IiwiTWVhc3VyZWQiLCJNaW4iLCJSZXN1bHQiXX0seyJuIjoyLCJjZWxscyI6WyJCb2x0IEEiLCIxMC4xIiwiOS41IiwiIl19LHsibiI6MywiY2VsbHMiOlsiQm9sdCBCIiwiMTAuNiIsIjkuNSIsIiJdfSx7Im4iOjQsImNlbGxzIjpbIldhc2hlciIsIjIiLCIxLjgiLCIiXX0seyJuIjo1LCJjZWxscyI6WyJOdXQiLCIxLjciLCIxLjgiLCIiXX1dLCJ0YXJnZXQiOlsxLDNdfX0%2Cp_Ii9wcmFjdGljZS9sb2dpY2FsL2FuZC1iZXR3ZWVuLXR3by1saW1pdHMi%2Cs_UebCXb-Qf-_KjTP4.png"
  "og:image:height": "600"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "Check a value is within limits | PracticeExcel"
  "twitter:image": "https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_Check%2Ba%2Bvalue%2Bis%2Bwithin%2Blimits%2Cdescription_~UHJhY3RpY2UgQU5EIGluc2lkZSBJRiBpbiBhIGxpdmUgc3ByZWFkc2hlZXQ6IGNoZWNrIHRoYXQgZWFjaCBtZWFzdXJlbWVudCBsaWVzIGJldHdlZW4gaXRzIG1pbmltdW0gYW5kIG1heGltdW0u%2Ceyebrow_AND%2Band%2BOR%2Csite_practiceexcel%2Cprops_eyJncmlkIjp7ImNvbHMiOlsiQSIsIkIiLCJDIiwiRSJdLCJyb3dzIjpbeyJuIjoxLCJjZWxscyI6WyJQYXJ0IiwiTWVhc3VyZWQiLCJNaW4iLCJSZXN1bHQiXX0seyJuIjoyLCJjZWxscyI6WyJCb2x0IEEiLCIxMC4xIiwiOS41IiwiIl19LHsibiI6MywiY2VsbHMiOlsiQm9sdCBCIiwiMTAuNiIsIjkuNSIsIiJdfSx7Im4iOjQsImNlbGxzIjpbIldhc2hlciIsIjIiLCIxLjgiLCIiXX0seyJuIjo1LCJjZWxscyI6WyJOdXQiLCIxLjciLCIxLjgiLCIiXX1dLCJ0YXJnZXQiOlsxLDNdfX0%2Cp_Ii9wcmFjdGljZS9sb2dpY2FsL2FuZC1iZXR3ZWVuLXR3by1saW1pdHMi%2Cs_UebCXb-Qf-_KjTP4.png"
---

> Index of every page on this site: [llms.txt](https://practiceexcelonline.com/llms.txt)

# **Check a value is within limits**

**Premium**

In E2, show "OK" if the measurement in B2 is between the limits in C2 and D2, both included, and "Check" if not. Both tests must be true, so use AND inside IF.

E2fx

|  | A | B | C | D | E | F |
| --- | --- | --- | --- | --- | --- | --- |
| 1 | Part | Measured | Min | Max | Result | |
| 2 | Bolt A | 10.1 | 9.5 | 10.5 |  | |
| 3 | Bolt B | 10.6 | 9.5 | 10.5 |  | |
| 4 | Washer | 2 | 1.8 | 2.2 |  | |
| 5 | Nut | 1.7 | 1.8 | 2.2 |  | |
| 6 |  |  |  |  |  | |
| 7 |  |  |  |  |  | |
| 8 |  |  |  |  |  | |

**Premium lesson**

## **Unlock AND and OR and every other lesson**

This is a premium lesson. Premium lets you solve it and every other lesson, take the timed mock tests, and earn certificates you can share on LinkedIn.

Next with premium:**IFS and SWITCH****Conditional formatting**

It comes up in this mock test: [**Excel test for job interviews**](https://practiceexcelonline.com/tests/excel-test-for-job-interview)

[**See plans, from $5/month**](https://practiceexcelonline.com/pricing) [**Already premium? Sign in**](https://practiceexcelonline.com/login?next=/practice/logical/and-between-two-limits)

Need help?

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://practiceexcelonline.com/#identity","@type":"Organization","name":"PracticeExcel","url":"https://practiceexcelonline.com/","logo":{"@id":"https://practiceexcelonline.com/#logo"}},{"@id":"https://practiceexcelonline.com/#website","@type":"WebSite","inLanguage":"en-US","name":"PracticeExcel","url":"https://practiceexcelonline.com/","alternateName":["Practice Excel Online","PracticeExcelOnline.com"],"publisher":{"@id":"https://practiceexcelonline.com/#identity"},"workTranslation":{"@id":"https://excelopgaver.dk/#website"}},{"@id":"https://practiceexcelonline.com/practice/logical/and-between-two-limits#webpage","description":"Practice AND inside IF in a live spreadsheet: check that each measurement lies between its minimum and maximum.","name":"Check a value is within limits","url":"https://practiceexcelonline.com/practice/logical/and-between-two-limits","@type":["WebPage","FAQPage"],"breadcrumb":{"@id":"https://practiceexcelonline.com/practice/logical/and-between-two-limits#breadcrumb"},"isPartOf":{"@id":"https://practiceexcelonline.com/#website"},"mainEntity":[{"@id":"https://practiceexcelonline.com/practice/logical/and-between-two-limits#/schema/question/1"}],"potentialAction":[{"@type":"ReadAction","target":["https://practiceexcelonline.com/practice/logical/and-between-two-limits"]}],"primaryImageOfPage":{"@id":"https://practiceexcelonline.com/#logo"}},{"@id":"https://practiceexcelonline.com/practice/logical/and-between-two-limits#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://practiceexcelonline.com","position":1},{"@type":"ListItem","name":"Excel practice exercises","item":"https://practiceexcelonline.com/practice","position":2},{"@type":"ListItem","name":"AND and OR","item":"https://practiceexcelonline.com/practice/logical","position":3},{"@type":"ListItem","name":"Check a value is within limits","position":4}]},{"@id":"https://practiceexcelonline.com/practice/logical/and-between-two-limits#/schema/question/1","@type":"Question","inLanguage":"en-US","name":"How do I check if a value is between two numbers in Excel?","acceptedAnswer":{"@type":"Answer","text":"=IF(AND(B2>=C2,B2\u003C=D2),\"OK\",\"Check\"). Use > and \u003C instead if the limits themselves don't count."}},{"@id":"https://practiceexcelonline.com/practice/logical/and-between-two-limits#/schema/learning-resource/1","@type":"LearningResource","description":"Practice AND inside IF in a live spreadsheet: check that each measurement lies between its minimum and maximum.","educationalLevel":"intermediate","isAccessibleForFree":false,"learningResourceType":"exercise","name":"Check a value is within limits","teaches":"AND and OR"},{"@id":"https://practiceexcelonline.com/#logo","@type":"ImageObject","caption":"PracticeExcel","contentUrl":"https://practiceexcelonline.com/brand/practiceexcel/icon-512.png","inLanguage":"en-US","url":"https://practiceexcelonline.com/brand/practiceexcel/icon-512.png"}]}
```

## Sitemap

See the full [sitemap](https://practiceexcelonline.com/sitemap.md) for all pages.
