> 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/countblank-function.md).

# COUNTBLANK関数について

### **COUNTBLANK関数の結合セルに対する処理の違い**

ExcelでCOUNTBLANK関数を使用した場合、結合セルを１つのセルとは見なさずに、範囲内の各セルを１つ１つ個別に扱って計算を行います。

【Excelの例】\
Excelでは結合状態に関わらず指定範囲内のセルを個別にカウントします。\
下記図では、25個のセルを結合して1つのセル（クラスター）としており、範囲内の各セルを1つ1つ個別に扱うため、結果は「100」になります。

<div align="left"><figure><img src="/files/lKiZruwDCL65vJr6ruiV" alt="" width="563"><figcaption></figcaption></figure></div>

これに対して、i-Reporterでは、結合セルを１つのクラスターとみなして計算を行います。\
これにより、結合セルを含むCOUNTBLANK関数の計算結果はEXCELとi-Reporterとで違いが表れます。

【i-Reporterの例】\
下記図は、先ほどの【Excelの例】のExcelファイルを取込んで作成した帳票定義の例です。\
i-Reporterでは結合セルを１つのクラスターとみなしてカウントするため、結果は「4」になります。

<div align="left"><figure><img src="/files/U0j5yFGNRzIbFJ2s6Moh" alt="" width="563"><figcaption></figcaption></figure></div>

{% hint style="success" %}
i-Reporterで、結合セルを１つのクラスターとみなしてカウントするのは、COUNTBLANK関数のみの動きです。\
COUNTIF関数など他のCOUNT系関数は、Excelと同様に、範囲内の各セルを1つ1つ個別に扱います。

そのため、「空白クラスターの数を数えたい」場合は、COUNTBLANK関数をお使いください。\
COUNTIF関数などを使用した場合、正しい空白数を求めることができません。
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://manuals.i-reporter.jp/create-a-form/prepare-the-formexcelfile/excelfunctions/countblank-function.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
