Normalize text formatting in Excel

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

Quick answer

Standardize presentation differences without changing identifiers or meaningful text. Provide: Fields and meanings, Representative values, Approved display standard. Expected result: Field-specific normalization formulas, exception flags, and before-after tests.

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

Design field-specific Excel rules to normalize text formatting.

Fields and meanings:
[fields]

Representative values:
[samples]

Approved display standard:
[standard]

Separate harmless presentation cleanup from transformations that could change identity or meaning. Do not apply PROPER, remove punctuation, or convert text to numbers across every field. Preserve raw values and return one rule or formula per field, an exception condition, and before/after examples. Test nonbreaking spaces, repeated internal spaces, apostrophes, hyphens, acronyms, multilingual text, blanks, and identifiers with leading zeros.
Try in Playground
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

Fields and meanings
A CustomerCode is a text identifier where leading zeros matter; B Email is case-insensitive for our matching; C ContactName is human-entered multilingual text; D Status is a controlled label.
Representative values
A: 001-AB, ' 001-AB '; B: ANA@EXAMPLE.COM, ana@example.com plus nonbreaking spaces; C: o'connor, ANA PÉREZ, 王 小明; D: in progress, In Progress, IN-PROGRESS.
Approved display standard
CustomerCode: trim outer whitespace only. Email: trim and lowercase. ContactName: remove outer and repeated spaces but do not force case. Status: canonical value 'In progress' after an approved mapping.

Example output

Keep the four raw columns and create clean companions. Replace nonbreaking spaces with ordinary spaces before trimming.

  • CustomerCode: =TRIM(SUBSTITUTE(A2,CHAR(160)," ")). Do not VALUE-convert or remove the hyphen; 001-AB must remain text. Flag any internal spaces.
  • Email: =LOWER(TRIM(SUBSTITUTE(B2,CHAR(160)," "))). Flag values that contain internal spaces or lack a usable @ structure; do not invent a corrected address.
  • ContactName: Microsoft 365: =TEXTJOIN(" ",TRUE,TEXTSPLIT(TRIM(SUBSTITUTE(C2,CHAR(160)," "))," ",,TRUE)). This collapses repeated spaces but deliberately preserves o'connor, ANA PÉREZ, and Chinese characters as entered. Do not use PROPER without human approval.
  • Status: normalize a comparison key with lowercase, trimmed spaces, and an approved hyphen-to-space rule, then XLOOKUP that key in a two-column mapping table. Unmapped values return Review.

Tests confirm that the customer code keeps both zeros, the two email variants normalize equally, names retain punctuation and case, and the three approved status variants map to In progress. Store RuleApplied and ReviewReason next to every clean value.

Why this works

  1. 1

    Field-specific rules prevent a visual cleanup from corrupting IDs, acronyms, or names.

  2. 2

    Raw and clean columns reveal every transformation instead of overwriting evidence.

Check the result

  • Has each field been classified as free text, controlled label, or identifier?

  • Are leading zeros and meaningful punctuation preserved?

  • Can changed values be compared directly with their raw source?

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 “Normalize text formatting in Excel”?

For “Normalize text formatting in Excel,” prepare Fields and meanings, Representative values, and Approved display standard. 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 “Normalize text formatting in Excel” result not ready to use?

The result is not ready if it does not yet deliver the stated outcome—Field-specific normalization formulas, exception flags, and before-after tests—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 “Normalize text formatting in Excel”?

The published test record for “Normalize text formatting in Excel” 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