Combine Excel columns with explicit blank rules

Author: AILesson5 min setupTested with:ChatGPTReviewed: 2026-08-28

Quick answer

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

1

Add your context

Your text stays in this browser. AILesson Prompts does not send it to a model or server.

2

Your prompt

Unfilled fields remain visible as placeholders, so you can still copy and edit the 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.
Private by defaultPrompt assembly happens locally in your browser. Avoid placing confidential information into any AI service unless your organization allows it.

From input to outcome

A worked example

See how concrete context turns this recipe into a usable result

Actual input

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.

Example output

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.

Why this works

  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.

Check the result

  • 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 it with confidence

Frequently asked questions

Practical answers about when to use this recipe, what to provide, and where human review still matters

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.

More ways to explore

Where this recipe fits

Keep the work moving