Combine Excel columns with explicit blank rules

Autor: AILesson5 min de preparaciónProbado con:ChatGPTRevisado el: 2026-08-28

Respuesta rápida

Join fields without stray separators, lost zeroes, collapsed distinctions, or silently changed missing values. Proporciona: 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

Añade tu contexto

Tu texto permanece en este navegador. AILesson Prompts no lo envía a un modelo ni a un servidor.

2

Tu prompt

Los campos sin rellenar permanecen visibles como marcadores de posición, para que puedas copiar y editar el 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.
Probar en Playground
Privado de forma predeterminadaLa preparación del prompt se realiza localmente en tu navegador. Evita introducir información confidencial en cualquier servicio de IA, a menos que tu organización lo permita.

De la entrada al resultado

Un ejemplo completo

Mira cómo un contexto concreto convierte esta receta en un resultado que puedes usar

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.

Ejemplo de salida

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 qué 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.

Comprueba el 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?

Úsalo con confianza

Preguntas frecuentes

Respuestas prácticas sobre cuándo usar esta receta, qué debes proporcionar y en qué casos la revisión humana sigue siendo 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.

Más formas de explorar

Dónde encaja esta receta

Mantén el trabajo en marcha