Generate an Excel formula from a requirement

Автор: AILesson4 мин на настройкуПроверено на:ChatGPTПроверено: 2026-08-28

Быстрый ответ

Turn a calculation need and real column layout into a formula you can verify. Укажите: Calculation requirement, Columns or cells, Example rows and expected results. Ожидаемый результат: A copy-ready formula, explanation, assumptions, and test cases.

1

Добавьте контекст

ваш текст остаётся в этом браузере. AILesson Prompts не отправляет его ни в модель, ни на сервер.

2

Ваш промпт

Незаполненные поля остаются видимыми как заполнители, поэтому вы всё равно можете скопировать и отредактировать промпт

Create an Excel formula for this requirement:
[requirement]

Workbook layout:
[layout]

Example rows and expected results:
[examples]

Use the stated headers or cell references exactly. Do not invent missing columns. If the requirement is ambiguous, list the ambiguity before proposing a formula. Return:
1. Formula for the first data row
2. Plain-language explanation of each part
3. Assumptions about blanks, errors, dates, text, and regional separators
4. Three test cases with expected results
5. A simpler alternative if one exists

Prefer standard Excel functions and do not use volatile functions unless they are necessary.
Попробовать в Playground
Конфиденциально по умолчаниюПромпт собирается локально в вашем браузере. Не вводите конфиденциальную информацию в сервисы ИИ, если ваша организация этого не разрешает.

От исходных данных к результату

Разобранный пример

Посмотрите, как конкретный контекст превращает этот рецепт в полезный результат

Реальный ввод

Calculation requirement
In column E, calculate the number of calendar days an order was open. Use the closed date when present; otherwise use 30 June 2026. Leave the result blank when the created date is missing.
Columns or cells
A: Order ID (text); C: Created Date (Excel date); D: Closed Date (Excel date or blank); E: Days Open. Data starts on row 2.
Example rows and expected results
C2=1 Jun 2026, D2=5 Jun 2026 => 4; C3=20 Jun 2026, D3 blank => 10; C4 blank, D4 blank => blank.

Пример вывода

  1. Formula for E2 =IF(C2="","",IF(D2="",DATE(2026,6,30)-C2,D2-C2))

  2. How it works The outer IF returns an empty string when C2 has no created date. The inner IF uses 30 June 2026 when D2 is blank; otherwise it subtracts the created date from the closed date. Excel stores dates as serial numbers, so subtraction returns calendar days.

  3. Assumptions C and D contain real Excel dates, not text. A same-day close returns 0. A closed date before creation produces a negative number and should be investigated rather than hidden. The formula uses commas; installations using semicolons must replace the separators.

  4. Tests 1 Jun to 5 Jun → 4; 20 Jun with no close → 10; missing created date → blank. Add a same-day case to confirm that 0 is intended.

  5. Alternative There is no meaningfully simpler standard formula that preserves all three rules.

Почему это работает

  1. 1

    Real headers and expected results constrain the formula to the actual workbook.

  2. 2

    Explicit edge cases expose blank and type-handling mistakes before the formula is filled down.

Проверьте результат

  • Does the formula reference only supplied cells or headers?

  • Do the test cases cover blanks and a boundary value?

  • Does the result match a manual calculation for at least two rows?

Используйте уверенно

Часто задаваемые вопросы

Практические ответы о том, когда использовать этот рецепт, что нужно предоставить и где по-прежнему важна проверка человеком

What should I prepare before using “Generate an Excel formula from a requirement”?

For “Generate an Excel formula from a requirement,” prepare Calculation requirement, Columns or cells, and Example rows and expected results. Replace placeholders only with information you can verify. If a detail is unknown, preserve that uncertainty explicitly instead of asking the model to infer it.

When is the “Generate an Excel formula from a requirement” result not ready to use?

The result is not ready if it does not yet deliver the stated outcome—A copy-ready formula, explanation, assumptions, and test cases—from the supplied evidence, or if it relies on unresolved assumptions, missing approvals, or invented details. Use the checks as release gates: revise the source inputs or assign a named, authorized reviewer instead of polishing an unsupported output.

Which AI tools have recorded tests for “Generate an Excel formula from a requirement”?

The published test record for “Generate an Excel formula from a requirement” lists ChatGPT as of 2026-08-28. This confirms recorded runs, not guaranteed compatibility or identical results in later product versions. For another tool or version, keep every constraint visible and repeat the result checks before use.

Другие способы изучения

Где этот рецепт применим

Продолжайте работу

AILesson · Рекомендуемые курсы

ваш следующий шаг: примените ИИ на практике

Перейдите от понимания ИИ к выполнению задач. Практикуйтесь в составлении запросов, проверке и улучшении результатов с помощью интерактивных уроков для работы и повседневной жизни.

Просмотреть все курсы