{
  "category": "Logical functions",
  "display_name": "AND",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.AND",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20430"
      ],
      "larger_numeric": 0,
      "last_bit": 0,
      "matched": 1210,
      "other_mismatch": 0,
      "refused": 0,
      "rows": 1210,
      "unread": 0,
      "worst_ulp": 0
    },
    "detail": "Recorded: 1,210 in the answer bank and 54 workbook cells.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "matches",
    "state_label": "Matches every recorded Excel answer",
    "summary": "Matches all 1,264 recorded answers",
    "workbook_corpus": {
      "cells": 54,
      "matched": 54
    }
  },
  "implementations": [
    {
      "commit": "9e1884369a678158dd82d3d74188daf986995e87",
      "flavour": "excel-compatibility-candidate",
      "language": "Rust",
      "name": "CalcFunc",
      "own_code": [
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/logical.rs#L98-L98",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/logical.rs#L140-L148"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/aggregate::reader",
        "catalogue/aggregate::read_reference",
        "catalogue/logical::logicals",
        "catalogue/logical::decide",
        "catalogue/logical::tally",
        "catalogue/logical::direct",
        "catalogue/logical::held",
        "catalogue/logical::not_callable"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/logical.rs#L98-L98",
      "state": "matches",
      "suite": null,
      "summary": "Matches all 1,264 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.AND.json",
  "name": "AND",
  "notes": [],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n### Relationships\n\n\n- `OR` is the dual: same scan, same skip rules, same empty-scan `#VALUE!`, returning TRUE on the\n  first truthy item instead of FALSE on the first falsy one.\n- `XOR` uses the same scan and returns the **parity** of the truthy items rather than their\n  conjunction, which makes it a genuinely different reduction and not \"OR without the ties\".\n- `NOT` is the unary complement, and is *not* a reducer: it takes exactly one argument.\n- `IF` is where `AND` results usually land. `IF(AND(a,b), x, y)` is the idiom; note that `AND`\n  evaluates every argument, so it does not give you short-circuit evaluation of side effects — it\n  gives you a short-circuited *scan* over already-evaluated values.\n- Readers confuse `AND` with the `*` idiom (`(a>1)*(b>2)`), which multiplies coerced logicals and\n  therefore has completely different empty/text behaviour and returns a number.\n\n\n",
    "how-to-implement": "\n### Notes for implementers\n\n1. **Three buckets, not two.** Modelling the item classification as `Option<bool>` — true, false,\n   or skip — is what makes rule 3 expressible. A two-valued model cannot distinguish \"no truth\n   values present\" from \"all present values were true\".\n3. **Early exit is an optimisation with a visible edge.** Returning FALSE the moment a falsy item\n   is seen is only safe if you have already committed to error propagation ordering — an error\n   *after* the first FALSE would never be seen. Whether Excel's own scan stops early is a real,\n   observable question and is listed below as unchecked.\n\n\n",
    "quirks": "\n### Result and edge cases\n\n\nReturns a `Logical`, or an `Error`.\n\n- **Zero versus nonzero.** Any nonzero number is true, including negative numbers and the largest\n  finite double. Only exact zero is false. There is no rounding or tolerance in this test.\n- **Empty cells.** Skipped, per the documented ignore rule.\n- **All items skipped.** `#VALUE!`, per rule 3 above.\n\n\n",
    "sources": "- Handbook call-model chapters\n  [01 The value universe](../model/01-value-universe.md),\n  [02 Coercion and lifting](../model/02-coercion-and-lifting.md),\n  [03 The call pipeline](../model/03-call-pipeline.md).\n- `data/functions/FUNC.AND.json` — arity, classification axes, localized names.\n\n\n",
    "version-differences": "The recorded environments below distinguish a reading from a same-input comparison. Counts describe captured inputs in each environment; overlapping captures and comparisons are not totals of unique worksheet calls.\n\n| Excel 16.0 build | Platform and CPU | Captured inputs |\n|---|---|---:|\n| 20430 | Windows, 64-bit, CPU not recorded | 1,210 |\n\nThe record contains no same-input comparison between these environments. Reading different inputs on different builds does not establish either a version change or cross-build agreement.\n\n[Recorded environments and comparison details](https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.AND.json).",
    "what-it-does": "\n`AND` is not a two-operand boolean connective. It is a **variadic reduction over a truth scan**,\nand that difference is the whole content of the function.\n\nThe scan walks the argument list left to right. Each argument is expanded: a direct scalar\ncontributes itself; a reference or array contributes every cell it designates, in row-major order.\nEach expanded item is then classified into exactly one of three buckets:\n\n| Item | Classification |\n|---|---|\n| `Logical` | its own truth value |\n| `Number` | false if the number is exactly 0, true otherwise |\n| Text or empty inside an array or reference argument | **skipped** — contributes nothing |\n| `Error` | the scan stops and that error is the result |\n\nThe result is then:\n\n1. **FALSE** if any item classified false;\n2. **TRUE** if at least one item classified (true or false) and none classified false;\n3. **`#VALUE!`** if no item classified at all — every item was skipped.\n\nRule 3 is the clause readers forget. `AND` over a range holding nothing but text is not vacuously\nTRUE; it is an error. Microsoft's documentation states this directly for the range case: when the\nspecified range contains no logical values, `AND` returns `#VALUE!`. In logical terms `AND` is\ntherefore *not* the fold of conjunction over an empty list — it refuses the empty case rather than\nreturning the identity element.\n\n\n\n### Arguments\n\n\n`AND(logical1, [logical2], ...)`\n\n- Every argument is a *condition or a container of conditions*. Microsoft describes them as values\n  that must evaluate to logical values, or arrays and references containing logical values.\n\n\nThe commonly misunderstood position is *all of them at once*: readers expect `AND` to coerce\nwhatever it is handed, and it does not. Numbers and logicals participate; text and blanks reached\nthrough a range do not. See the shared rule in\n[Coercion and lifting](../model/02-coercion-and-lifting.md) — direct arguments and range-scanned\ncells are governed by different policies, and `AND` is one of the families that exercises the\ndifference.\n\n\n"
  },
  "signature": {
    "display": "AND(logical1, [logical2], ...)",
    "parameters": [
      {
        "description": null,
        "name": "logical1",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "logical2",
        "optional": true,
        "repeats": true
      }
    ],
    "trailing_repeats": true
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 255,
        "min": 1
      },
      "category": "Logical functions",
      "classification": {
        "arg_preparation_profile": "ValuesOnlyPreAdapter",
        "coercion_lift_profile": "Custom",
        "determinism_class": "Deterministic",
        "error_collapse_profile": "None",
        "fec_dependency_profile": "None",
        "host_interaction_class": "None",
        "kernel_signature_class": "Custom",
        "rich_value_usage": "RichBlind",
        "surface_fec_dependency_profile": "RefOnly",
        "thread_safety_class": "SafePure",
        "volatility_class": "NonVolatile"
      },
      "descriptions": {
        "long": null,
        "short": "TRUE only when every argument is TRUE",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns TRUE if all of its arguments are TRUE",
        "microsoft_url": "https://support.microsoft.com/en-us/office/and-function-5f19b2e8-e1df-4408-897a-ce285a19e9d9"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "AND"
        },
        {
          "locale": "bg-BG",
          "name": "AND"
        },
        {
          "locale": "cs-CZ",
          "name": "AND"
        },
        {
          "locale": "da-DK",
          "name": "AND"
        },
        {
          "locale": "de-DE",
          "name": "UND"
        },
        {
          "locale": "el-GR",
          "name": "AND"
        },
        {
          "locale": "en-AU",
          "name": "AND"
        },
        {
          "locale": "en-GB",
          "name": "AND"
        },
        {
          "locale": "en-US",
          "name": "AND"
        },
        {
          "locale": "es-ES",
          "name": "Y"
        },
        {
          "locale": "et-EE",
          "name": "AND"
        },
        {
          "locale": "fi-FI",
          "name": "AND"
        },
        {
          "locale": "fr-FR",
          "name": "ET"
        },
        {
          "locale": "he-IL",
          "name": "AND"
        },
        {
          "locale": "hr-HR",
          "name": "AND"
        },
        {
          "locale": "hu-HU",
          "name": "AND"
        },
        {
          "locale": "id-ID",
          "name": "AND"
        },
        {
          "locale": "it-IT",
          "name": "AND"
        },
        {
          "locale": "ja-JP",
          "name": "AND"
        },
        {
          "locale": "ko-KR",
          "name": "AND"
        },
        {
          "locale": "lt-LT",
          "name": "AND"
        },
        {
          "locale": "lv-LV",
          "name": "AND"
        },
        {
          "locale": "nb-NO",
          "name": "AND"
        },
        {
          "locale": "nl-NL",
          "name": "AND"
        },
        {
          "locale": "pl-PL",
          "name": "AND"
        },
        {
          "locale": "pt-BR",
          "name": "AND"
        },
        {
          "locale": "pt-PT",
          "name": "E"
        },
        {
          "locale": "ro-RO",
          "name": "AND"
        },
        {
          "locale": "ru-RU",
          "name": "AND"
        },
        {
          "locale": "sk-SK",
          "name": "AND"
        },
        {
          "locale": "sl-SI",
          "name": "AND"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "AND"
        },
        {
          "locale": "sv-SE",
          "name": "OCH"
        },
        {
          "locale": "th-TH",
          "name": "AND"
        },
        {
          "locale": "tr-TR",
          "name": "VE"
        },
        {
          "locale": "uk-UA",
          "name": "AND"
        },
        {
          "locale": "vi-VN",
          "name": "AND"
        },
        {
          "locale": "zh-CN",
          "name": "AND"
        },
        {
          "locale": "zh-HK",
          "name": "AND"
        },
        {
          "locale": "zh-TW",
          "name": "AND"
        }
      ],
      "signature": {
        "display": "AND(logical1, [logical2], ...)",
        "parameters": [
          {
            "description": null,
            "name": "logical1",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "logical2",
            "optional": true,
            "repeats": true
          }
        ],
        "trailing_repeats": true
      },
      "surface_name": "AND",
      "version_marker": null,
      "xlcall": {
        "code": "36",
        "symbol": "xlfAnd"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/and-function-5f19b2e8-e1df-4408-897a-ce285a19e9d9"
  },
  "try_it": {
    "formula": "=AND(TRUE,2>1)"
  },
  "url": "https://handbook.dnacalc.com/functions/AND.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "1,210 captured inputs are indexed for this environment. Capture dates: 2026-09-29 to 2026-09-29. This is a reading count, not a comparison with another build.",
      "excel_build": "16.0 build 20430",
      "platform": "Windows, 64-bit, CPU not recorded",
      "sources": [
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.AND.json"
      ]
    }
  ]
}