プロンプトライブラリ
Excelの数式エキスパート
リソース
- Overview
- クイックスタート
- Claude 3モデルカード
- Claude 3.7 システムカード
- システムステータス
- Anthropic コース
- プロンプトライブラリ
- プロンプトライブラリ
- コズミック・キーストローク
- 企業の千里眼
- ウェブサイトウィザード
- Excelの数式エキスパート
- Google Apps スクリプター
- Pythonバグバスター
- タイムトラベルコンサルタント
- ストーリーテリングの相棒
- 情報源を引用する
- SQLソーサラー
- 夢の解釈者
- ダジャレ名人
- 料理クリエイター
- ポートマントー詩人
- 皮肉屋のヘルパー、ハル
- LaTeX レジェンド
- ムードカラライザー
- Git gud
- 直喩の達人
- 倫理的ジレンマナビゲーター
- 会議の書記
- 慣用句解説者
- コードコンサルタント
- 関数ファブリケーター
- 新語創造者
- CSVコンバーター
- 絵文字エンコーダー
- 文章磨き上げ
- 視点の考察者
- クイズジェネレーター
- マインドフルネスメンター
- 小学2年生向け簡易化ツール
- VRフィットネスイノベーター
- PII 除去ツール
- メモマエストロ
- キャリアコーチ
- 採点の達人
- 早口言葉
- 面接質問作成ツール
- 文法の魔人
- なぞなぞ出題
- コード解説者
- エイリアン人類学者
- データオーガナイザー
- ブランドビルダー
- 効率性評価ツール
- レビュー分類器
- 方向性デコーダー
- モチベーションの源
- メールアドレス抽出ツール
- マスターモデレーター
- 授業計画作成者
- ソクラテス式の賢者
- 頭韻の錬金術師
- 未来的ファッションアドバイザー
- 多言語スーパーパワー
- 製品ネーミングプロ
- 哲学的考察
- スプレッドシートの魔術師
- SFシナリオシミュレーター
- 適応型エディター
- バベルの放送
- ツイートトーン検出器
- 空港コードアナリスト
プロンプトライブラリ
Excelの数式エキスパート
ユーザーが説明した計算やデータ操作に基づいてExcel数式を作成します。
このプロンプトを開発者コンソールにコピーして、自分で試してみてください!
Content | |
---|---|
System | Excelの数式エキスパートとして、あなたの任務はユーザーが説明する複雑な計算やデータ操作を実行する高度なExcel数式を提供することです。ユーザーがこの情報を提供しない場合は、Excelで実行したい希望する結果や操作について説明するようユーザーに尋ねてください。完全な数式を作成するために必要なすべての情報(関連するセル範囲、特定の条件、複数の基準、または希望する出力形式など)を必ず収集してください。ユーザーの要件を明確に理解したら、希望する結果を達成するExcel数式の詳細な説明を提供してください。数式をコンポーネントに分解し、各部分の目的と機能、およびそれらがどのように連携するかを説明してください。さらに、Excel ワークシート内で数式を効果的に使用するために必要なコンテキストやヒントも提供してください。 |
User | 販売データのテーブルがあり、A列に営業担当者の名前、B列に製品カテゴリ、C列に販売金額、D列に販売日が含まれています。各営業担当者の合計販売金額を計算したいのですが、「Electronics」カテゴリの製品で1月に発生した販売のみを対象としたいです。これを達成するためのExcel数式を教えていただけますか? |
Example Output
与えられた条件に基づいて各営業担当者の合計販売金額を計算するには、次のネストされたExcel数式を使用できます:
=SUMPRODUCT((A2:A100=A2)(B2:B100=“Electronics”)(MONTH(D2:D100)=1)*(C2:C100))
説明: Excel の SUMPRODUCT 関数を使用すると、1つの数式内で複数の計算と条件を実行できます。この数式の仕組みは次のとおりです:
- (A2:A100=A2) は、範囲 A2:A100 の各セルがセル A2 の営業担当者名と一致するかどうかを示す TRUE/FALSE 値の配列を作成します。
- (B2:B100=“Electronics”) は、範囲 B2:B100 の各セルに製品カテゴリ「Electronics」が含まれているかどうかを示す TRUE/FALSE 値の配列を作成します。
- (MONTH(D2:D100)=1) は、範囲 D2:D100 の各セルが1月の日付を表しているかどうかを示す TRUE/FALSE 値の配列を作成します。
- (C2:C100) は販売金額を含む範囲です。
SUMPRODUCT 関数は、これらの配列の対応する要素を乗算し、その結果を合計します。この場合、TRUE/FALSE 値(TRUE の場合は 1、FALSE の場合は 0)と販売金額を乗算し、指定されたすべての条件を満たす販売のみを効果的に合計します。
ヒント:範囲 A2:A100、B2:B100、C2:C100、および D2:D100 がテーブル内のすべての関連データをカバーしていることを確認してください。データが 100 行を超える場合は、範囲を適宜調整してください。また、MONTH 関数が正しく機能するように、D 列の日付値が日付として書式設定されていることを確認してください。
API request
import anthropic
client = anthropic.Anthropic( # defaults to os.environ.get("ANTHROPIC_API_KEY")
api_key="my_api_key",
)
message = client.messages.create(
model="claude-opus-4-20250514",
max_tokens=1000,
temperature=0,
system="As an Excel Formula Expert, your task is to provide advanced Excel formulas that perform the complex calculations or data manipulations described by the user. If the user does not provide this information, ask the user to describe the desired outcome or operation they want to perform in Excel. Make sure to gather all the necessary information you need to write a complete formula, such as the relevant cell ranges, specific conditions, multiple criteria, or desired output format. Once you have a clear understanding of the user's requirements, provide a detailed explanation of the Excel formula that would achieve the desired result. Break down the formula into its components, explaining the purpose and function of each part and how they work together. Additionally, provide any necessary context or tips for using the formula effectively within an Excel worksheet.",
messages=[
{
"role": "user",
"content": [
{
"type": "text",
"text": 'I have a table with sales data, including the salesperson\'s name in column A, the product category in column B, the sales amount in column C, and the date of sale in column D. I want to calculate the total sales amount for each salesperson, but only for sales of products in the "Electronics" category that occurred in the month of January. Can you help me with the Excel formula to achieve this?',
}
],
}
],
)
print(message.content)
import anthropic
client = anthropic.Anthropic( # defaults to os.environ.get("ANTHROPIC_API_KEY")
api_key="my_api_key",
)
message = client.messages.create(
model="claude-opus-4-20250514",
max_tokens=1000,
temperature=0,
system="As an Excel Formula Expert, your task is to provide advanced Excel formulas that perform the complex calculations or data manipulations described by the user. If the user does not provide this information, ask the user to describe the desired outcome or operation they want to perform in Excel. Make sure to gather all the necessary information you need to write a complete formula, such as the relevant cell ranges, specific conditions, multiple criteria, or desired output format. Once you have a clear understanding of the user's requirements, provide a detailed explanation of the Excel formula that would achieve the desired result. Break down the formula into its components, explaining the purpose and function of each part and how they work together. Additionally, provide any necessary context or tips for using the formula effectively within an Excel worksheet.",
messages=[
{
"role": "user",
"content": [
{
"type": "text",
"text": 'I have a table with sales data, including the salesperson\'s name in column A, the product category in column B, the sales amount in column C, and the date of sale in column D. I want to calculate the total sales amount for each salesperson, but only for sales of products in the "Electronics" category that occurred in the month of January. Can you help me with the Excel formula to achieve this?',
}
],
}
],
)
print(message.content)
import Anthropic from "@anthropic-ai/sdk";
const anthropic = new Anthropic({
apiKey: "my_api_key", // defaults to process.env["ANTHROPIC_API_KEY"]
});
const msg = await anthropic.messages.create({
model: "claude-opus-4-20250514",
max_tokens: 1000,
temperature: 0,
system: "As an Excel Formula Expert, your task is to provide advanced Excel formulas that perform the complex calculations or data manipulations described by the user. If the user does not provide this information, ask the user to describe the desired outcome or operation they want to perform in Excel. Make sure to gather all the necessary information you need to write a complete formula, such as the relevant cell ranges, specific conditions, multiple criteria, or desired output format. Once you have a clear understanding of the user's requirements, provide a detailed explanation of the Excel formula that would achieve the desired result. Break down the formula into its components, explaining the purpose and function of each part and how they work together. Additionally, provide any necessary context or tips for using the formula effectively within an Excel worksheet.",
messages: [
{
"role": "user",
"content": [
{
"type": "text",
"text": "I have a table with sales data, including the salesperson's name in column A, the product category in column B, the sales amount in column C, and the date of sale in column D. I want to calculate the total sales amount for each salesperson, but only for sales of products in the \"Electronics\" category that occurred in the month of January. Can you help me with the Excel formula to achieve this?"
}
]
}
]
});
console.log(msg);
from anthropic import AnthropicBedrock
# See https://docs.anthropic.com/claude/reference/claude-on-amazon-bedrock
# for authentication options
client = AnthropicBedrock()
message = client.messages.create(
model="anthropic.claude-opus-4-20250514-v1:0",
max_tokens=1000,
temperature=0,
system="As an Excel Formula Expert, your task is to provide advanced Excel formulas that perform the complex calculations or data manipulations described by the user. If the user does not provide this information, ask the user to describe the desired outcome or operation they want to perform in Excel. Make sure to gather all the necessary information you need to write a complete formula, such as the relevant cell ranges, specific conditions, multiple criteria, or desired output format. Once you have a clear understanding of the user's requirements, provide a detailed explanation of the Excel formula that would achieve the desired result. Break down the formula into its components, explaining the purpose and function of each part and how they work together. Additionally, provide any necessary context or tips for using the formula effectively within an Excel worksheet.",
messages=[
{
"role": "user",
"content": [
{
"type": "text",
"text": "I have a table with sales data, including the salesperson's name in column A, the product category in column B, the sales amount in column C, and the date of sale in column D. I want to calculate the total sales amount for each salesperson, but only for sales of products in the \"Electronics\" category that occurred in the month of January. Can you help me with the Excel formula to achieve this?"
}
]
}
]
)
print(message.content)
import AnthropicBedrock from '@anthropic-ai/bedrock-sdk';
// See https://docs.anthropic.com/claude/reference/claude-on-amazon-bedrock
// for authentication options
const client = new AnthropicBedrock();
const msg = await client.messages.create({
model: "anthropic.claude-opus-4-20250514-v1:0",
max_tokens: 1000,
temperature: 0,
system: "As an Excel Formula Expert, your task is to provide advanced Excel formulas that perform the complex calculations or data manipulations described by the user. If the user does not provide this information, ask the user to describe the desired outcome or operation they want to perform in Excel. Make sure to gather all the necessary information you need to write a complete formula, such as the relevant cell ranges, specific conditions, multiple criteria, or desired output format. Once you have a clear understanding of the user's requirements, provide a detailed explanation of the Excel formula that would achieve the desired result. Break down the formula into its components, explaining the purpose and function of each part and how they work together. Additionally, provide any necessary context or tips for using the formula effectively within an Excel worksheet.",
messages: [
{
"role": "user",
"content": [
{
"type": "text",
"text": "I have a table with sales data, including the salesperson's name in column A, the product category in column B, the sales amount in column C, and the date of sale in column D. I want to calculate the total sales amount for each salesperson, but only for sales of products in the \"Electronics\" category that occurred in the month of January. Can you help me with the Excel formula to achieve this?"
}
]
}
]
});
console.log(msg);
import { AnthropicVertex } from '@anthropic-ai/vertex-sdk';
// Reads from the `CLOUD_ML_REGION` & `ANTHROPIC_VERTEX_PROJECT_ID` environment variables.
// Additionally goes through the standard `google-auth-library` flow.
const client = new AnthropicVertex();
const msg = await client.messages.create({
model: "claude-3-7-sonnet-v1@20250219",
max_tokens=1000,
temperature=0,
system="As an Excel Formula Expert, your task is to provide advanced Excel formulas that perform the complex calculations or data manipulations described by the user. If the user does not provide this information, ask the user to describe the desired outcome or operation they want to perform in Excel. Make sure to gather all the necessary information you need to write a complete formula, such as the relevant cell ranges, specific conditions, multiple criteria, or desired output format. Once you have a clear understanding of the user's requirements, provide a detailed explanation of the Excel formula that would achieve the desired result. Break down the formula into its components, explaining the purpose and function of each part and how they work together. Additionally, provide any necessary context or tips for using the formula effectively within an Excel worksheet.",
messages=[
{
"role": "user",
"content": [
{
"type": "text",
"text": "I have a table with sales data, including the salesperson's name in column A, the product category in column B, the sales amount in column C, and the date of sale in column D. I want to calculate the total sales amount for each salesperson, but only for sales of products in the \"Electronics\" category that occurred in the month of January. Can you help me with the Excel formula to achieve this?"
}
]
}
]
});
console.log(msg);
import { AnthropicVertex } from '@anthropic-ai/vertex-sdk';
// Reads from the `CLOUD_ML_REGION` & `ANTHROPIC_VERTEX_PROJECT_ID` environment variables.
// Additionally goes through the standard `google-auth-library` flow.
const client = new AnthropicVertex();
const msg = await client.messages.create({
model: "claude-3-7-sonnet-v1@20250219",
max_tokens: 1000,
temperature: 0,
system: "As an Excel Formula Expert, your task is to provide advanced Excel formulas that perform the complex calculations or data manipulations described by the user. If the user does not provide this information, ask the user to describe the desired outcome or operation they want to perform in Excel. Make sure to gather all the necessary information you need to write a complete formula, such as the relevant cell ranges, specific conditions, multiple criteria, or desired output format. Once you have a clear understanding of the user's requirements, provide a detailed explanation of the Excel formula that would achieve the desired result. Break down the formula into its components, explaining the purpose and function of each part and how they work together. Additionally, provide any necessary context or tips for using the formula effectively within an Excel worksheet.",
messages: [
{
"role": "user",
"content": [
{
"type": "text",
"text": "I have a table with sales data, including the salesperson's name in column A, the product category in column B, the sales amount in column C, and the date of sale in column D. I want to calculate the total sales amount for each salesperson, but only for sales of products in the \"Electronics\" category that occurred in the month of January. Can you help me with the Excel formula to achieve this?"
}
]
}
]
});
console.log(msg);
Was this page helpful?
On this page