Combine Excel columns with explicit blank rules

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

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

Join fields without stray separators, lost zeroes, collapsed distinctions, or silently changed missing values. Укажите: Columns and target, Combination and blank rules, Excel environment and output use. Ожидаемый результат: A copy-ready combination formula or transformation with blank policy and test cases.

1

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

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

2

Ваш промпт

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

Create a safe Excel method to combine the stated columns while preserving the supplied blank rules.

Source columns/cells, types, first row, target, scope, and samples:
[layout]

Order, labels, separators, spacing, line breaks, blanks, empty strings, zero, errors, required parts, and duplicates:
[rules]

Versions, Tables/ranges, locale, method preference, export, and recalculation:
[environment]

Distinguish a truly blank cell, a formula returning an empty string, numeric zero, FALSE, error, and literal text such as N/A. Define whether missing optional parts are skipped with their separator, while missing required parts should flag the row. Preserve leading zeroes and date formats by using explicit text formatting where needed, but do not convert identifiers unless their intended display is supplied. Choose TEXTJOIN, concatenation, a helper formula, or Power Query based on compatibility and refresh needs. Return: normalized blank policy; recommended method and first-row formula or transformation; explanation; structured-reference version if applicable; error and required-field handling; risks from formatting and downstream export; and tests for all-present, each blank position, empty string, zero, error, leading-zero ID, and copy-down.
Попробовать в Playground
Конфиденциально по умолчаниюПромпт собирается локально в вашем браузере. Не вводите конфиденциальную информацию в сервисы ИИ, если ваша организация этого не разрешает.

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

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

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

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

Columns and target
Excel Table Contacts. Columns: Unit (text, sometimes formula-empty), Street (required text), City (required text), Postal Code (text with leading zeroes), Extension (whole number where 0 is meaningful). Create Display Address in the same table. Example: Unit 4B; Street 18 Lake Rd; City Salem; Postal Code 01970; Extension 0.
Combination and blank rules
Address order: optional Unit followed by comma and space, then Street, City, Postal Code separated by comma-space. Do not include a separator for absent Unit. Street or City blank should return Review row, not a partial address. Postal Code blank may be skipped but flagged separately. Extension is not part of address; create a second Contact Label ending with ‘ext. value’, where 0 must display as ext. 0. Formula errors must remain visible as Review, not be silently ignored. Literal N/A is text, not blank.
Excel environment and output use
Microsoft 365 Excel Table, comma argument separators. Formula should recalculate when source cells change. Output is later exported to CSV, so no line breaks. Prefer formulas over Power Query.

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

Blank policy: Unit and Postal Code are optional and skipped when truly blank or formula-empty; Street and City are required. Numeric zero is data, not blank. N/A remains literal text. Any source error or missing required field returns Review.

Display Address formula: =IFERROR(IF(OR([@Street]="",[@City]=""),"Review",TEXTJOIN(", ",TRUE,[@Unit],[@Street],[@City],[@[Postal Code]])),"Review"). TEXTJOIN with ignore_empty TRUE removes Unit or Postal Code together with the would-be separator. Postal Code stays text, so 01970 remains intact. Add a separate audit column: =IF([@[Postal Code]]="","Postal code missing","").

Contact Label formula: =IFERROR(IF(OR([@Street]="",[@City]=""),"Review",TEXTJOIN(", ",TRUE,[@Unit],[@Street],[@City],[@[Postal Code]])&" — ext. "&TEXT([@Extension],"0")),"Review"). Do not use a truth test on Extension because zero must survive.

Tests: all present → “4B, 18 Lake Rd, Salem, 01970 — ext. 0”; Unit empty string → “18 Lake Rd, Salem, 01970” with no leading comma; Postal Code blank → address without it plus audit flag; Street blank → Review; Unit N/A → starts “N/A, …”; source error → Review; copying within the Table keeps row-scoped references. CSV export should be spot-checked for preserved 01970 and commas being quoted by the exporter.

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

  1. 1

    An explicit blank taxonomy prevents zero and formula-empty values from being discarded as if they meant the same thing.

  2. 2

    Separator rules tied to optional fields eliminate punctuation cleanup after concatenation.

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

  • Are blank, empty string, zero, FALSE, error, and literal missing labels handled intentionally?

  • Can optional fields disappear without leaving leading, trailing, or doubled separators?

  • Are identifiers, dates, and numeric display preserved for the downstream use?

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

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

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

What should I prepare before using “Combine Excel columns with explicit blank rules”?

For “Combine Excel columns with explicit blank rules,” prepare Columns and target, Combination and blank rules, and Excel environment and output use. 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 “Combine Excel columns with explicit blank rules” result not ready to use?

The result is not ready if it does not yet deliver the stated outcome—A copy-ready combination formula or transformation with blank policy 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 “Combine Excel columns with explicit blank rules”?

The published test record for “Combine Excel columns with explicit blank rules” 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 · Рекомендуемые курсы

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

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

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