> For the complete documentation index, see [llms.txt](https://manuals.i-reporter.jp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://manuals.i-reporter.jp/create-a-form/prepare-the-formexcelfile/excelfunctions/and-or-function.md).

# AND/OR関数について

## **AND/OR関数の使用制限**

AND/OR関数はIF関数の条件式でのみ使用可能です。\
また、AND/OR関数内で更にAND/OR 関数を使用することが可能です。\
AND/OR関数内では別の関数を使用することも可能です。

＝IF(<mark style="background-color:green;">**条件式**</mark>, TRUEの処理,FALSEの処理)

{% hint style="success" %}
IF関数の条件式でAND/OR関数の使用が可能です。
{% endhint %}

### **AND/OR関数の使用が可能な例**

＝IF(<mark style="background-color:green;">OR(AND(SUM(S1C0,S1C1)>0,S1C0=S1C1), AND(S1C1=S1C2,S1C1>0))</mark>,1,0)

{% hint style="success" %}
AND/OR関数内で更にAND/OR関数を使用することも可能です。\
AND/OR関数内で別の関数を使用することも可能です。
{% endhint %}

＝IF(S1C0<0,”NG”,SUM(IF(<mark style="background-color:green;">AND(S1C0=S1C1,S1C0=S1C2)</mark>,1,0),1))

{% hint style="success" %}
2つ目のIF関数の条件式でAND関数を使用しているので問題ありません。
{% endhint %}

### **AND/OR関数が使用できない例**

＝IF(SUM(<mark style="background-color:orange;">AND(S1C0>0,S1C1>0</mark>),S1C2,S1C3)>3,”OK”,”NG”)

{% hint style="warning" %}
SUM関数内でAND/OR関数を使用しているためNGとなります。
{% endhint %}
