Combine Excel columns with explicit blank rules

Autor: AILesson5 min de configuraçãoTestado com:ChatGPTRevisado em: 2026-08-28

Resposta rápida

Join fields without stray separators, lost zeroes, collapsed distinctions, or silently changed missing values. Forneça: Columns and target, Combination and blank rules, Excel environment and output use. Resultado esperado: A copy-ready combination formula or transformation with blank policy and test cases.

1

Adicione seu contexto

Seu texto permanece neste navegador. O AILesson Prompts não o envia para um modelo ou servidor.

2

Seu prompt

Campos não preenchidos permanecem visíveis como marcadores de posição, para que você ainda possa copiar e editar o prompt

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.
Experimente no Playground
Privado por padrãoA montagem do prompt acontece localmente no seu navegador. Evite colocar informações confidenciais em qualquer serviço de IA, a menos que sua organização permita.

Da entrada ao resultado

Um exemplo prático

Veja como um contexto concreto transforma esta receita em um resultado útil

Entrada real

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.

Exemplo de saída

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.

Por que isso funciona

  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.

Verifique o resultado

  • 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?

Use com confiança

Perguntas frequentes

Respostas práticas sobre quando usar esta receita, o que fornecer e onde a revisão humana ainda é importante

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.

Mais maneiras de explorar

Onde esta receita se encaixa

Mantenha o trabalho em andamento