> For the complete documentation index, see [llms.txt](https://manual.dxable.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://manual.dxable.com/smartsheet/formulas-and-functions/celltorowwoshitenawosuru.md).

# @cellと@rowを使用して効率的な数式を作成する

数式を最適化すると、シートの全体的なパフォーマンスが向上し、数式内のセルを手動で参照する必要がなくなります。

### プラン <a href="#gjdgxs" id="gjdgxs"></a>

* Smartsheet
* Pro
* Business
* Enterprise

プラン タイプと含まれる機能の詳細については、 [「Smartsheetプラン」](https://www.smartsheet.com/pricing)ページを参照してください。

### 許可 <a href="#id-30j0zll" id="id-30j0zll"></a>

シートの所有者であるか、管理者共有権限を持つユーザーは、シート上で数式を作成および編集できます。 編集者の共有権限を持つユーザーは、シート上の[ロックされていないセル](https://help.smartsheet.com/articles/522077)で数式を作成および編集することもできます。

この機能が[Smartsheet Regionals](https://help.smartsheet.com/regions-capability-differences)または[Smartsheet Govに含まれているかどうかを確認してください](https://help.smartsheet.com/articles/2480681)。

シートが大きくなるにつれて、数式を効率的に作成することがパフォーマンスにさらに役立ちます。 ここでは、数式をより効率的にするのに役立つ 2 つの関数、@cell と @row を見てみましょう。

#### @cell を使用してよりスマートなセル計算を実行する <a href="#id-1fob9te" id="id-1fob9te"></a>

SUMIF、SUMIFS、COUNTIF、COUNTIFS などのセル範囲を調べる数式で計算を実行する場合は、関数の条件で @cell 引数を使用できます。 @cell 引数は、主関数 (SUMIF など) が範囲内の条件を評価すると同時に各行の計算を実行するため、数式がより効率的になります。

たとえば、以下の画像のサンプル データを使用して、期日が 2023 年であるすべてのタスクのコストを合計したい場合は、次の式を作成します。

\=SUMIF(\[期日]1:\[期日]5, YEAR(@cell) = 2014, Cost1:Cost5)

![This image shows an a sumif formula.](/files/bY5U0CM8p4uHGdqdHtT2)

ヒント

IFERROR 関数を数式に追加して、@cell が数式内に空白セルを見つけた場合にエラーが発生しないようにします。 例: =COUNTIF(Date:Date, IFERROR(YEAR(@cell), 0) = 2016)

#### @row を使用して数式のパフォーマンスを向上させる <a href="#id-3znysh7" id="id-3znysh7"></a>

@row を使用すると、多数の行の列内のセル参照 (タスクのステータスなど) を自動的に変更することでパフォーマンスを向上させることができます。\
数式を使用して、このグリッドのステータス列のシンボルを自動的に変更するとします。

![This image shows a formula used to automatically change status balls.](/files/BOgCuUT0fqtmjbnCTJ0z)

以下は、ステータス列の RYG ボールの色の変更を自動化するために作成できる数式の例です。

\=IF(Complete3 <> 1, IF(TODAY() - \[期日]3 > 0, "赤", IF(TODAY() - \[期日]3 > -3, "黄", "緑")))

上記の数式には、行 3 のセルへの複数の参照が含まれています。 行 3 の上に行を追加すると、 Smartsheet は数式内のすべてのセル参照を行 4 に自動的に更新します。 Smartsheet は、以下のすべての行の数式も同じ方法で変更します。 変更する必要がある数式が増えるほど、 Smartsheetのパフォーマンスへの影響も大きくなります。

シートのパフォーマンスを向上させるには、セル参照内の行番号を @row に置き換えます。 @row を使用した数式は次のようになります。

\=IF(Complete\@row <> 1, IF(TODAY() - \[期日]@row > 0, "赤", IF(TODAY() - \[期日]@row > -3, "黄", "緑")))

行が移動された場合、 Smartsheet はセル参照を変更する必要がないため、シートの読み込みと保存の時間が短縮されます。 セル参照の行番号を手動で変更しなくても、この数式をコピーして貼り付けることもできるため、数式をコピーする必要があるときに時間を節約できます。

**まだ助けが必要ですか?**

[数式ハンドブック テンプレート](https://app.smartsheet.com/b/publish?EQBCT=32f8257f5d1948bfa948da170231a0c5)を使用すると、さらに多くのサポート リソースを見つけたり、リアルタイムで操作を練習できるすべての関数の用語集や、一般的に使用される高度な数式の例を含む 100 以上の数式を表示したりできます。

Smartsheetオンライン コミュニティで、他のSmartsheetユーザーがこの関数をどのように使用しているかの例を見つけたり、特定の使用例について質問したりできます。

[コミュニティに質問する](https://community.smartsheet.com/categories/formulas-and-functions?source=functionart)


---

# 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:

```
GET https://manual.dxable.com/smartsheet/formulas-and-functions/celltorowwoshitenawosuru.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
