Extract names, emails, or codes in Excel

Autor: AILesson5 Min. EinrichtungszeitGetestet mit:ChatGPTGeprüft am: 2026-08-28

Schnelle Antwort

Build a text formula from real delimiters without assuming every row has the same shape. Angeben: Text to extract, Observed input patterns, Excel version and rules. Erwartetes Ergebnis: A robust extraction formula with malformed-input checks.

1

Kontext hinzufügen

Dein Text bleibt in diesem Browser. AILesson Prompts sendet ihn nicht an ein Modell oder einen Server.

2

Dein Prompt

Nicht ausgefüllte Felder bleiben als Platzhalter sichtbar, sodass du den Prompt weiterhin kopieren und bearbeiten kannst.

Create an Excel formula to extract text.

Desired result:
[goal]

Observed input patterns:
[patterns]

Excel version and exception rules:
[version]

Identify the delimiter or positional rule and test whether it is stable across the supplied values. Do not assume all names have two words or all codes have fixed length unless stated. Return a modern formula, a legacy-compatible alternative when relevant, and tests for missing delimiters, repeated delimiters, leading/trailing spaces, blanks, and non-ASCII text. Keep malformed values visibly flagged rather than silently truncating them.
Im Playground ausprobieren
Standardmäßig privatDer Prompt wird lokal in deinem Browser zusammengestellt. Gib keine vertraulichen Informationen in einen KI-Dienst ein, es sei denn, deine Organisation erlaubt dies.

Von der Eingabe zum Ergebnis

Ein ausgearbeitetes Beispiel

Sieh dir an, wie konkreter Kontext dieses Rezept in ein nutzbares Ergebnis verwandelt.

Tatsächliche Eingabe

Text to extract
From A2 values formatted as 'Full Name <email>', extract the email into B2.
Observed input patterns
Normal: Ana Pérez <ana@example.com>; Chinese name: 王小明 <xiaoming@example.cn>; leading spaces; blank; malformed value without angle brackets; one row contains two '<' characters.
Excel version and rules
Microsoft 365 supports TEXTBEFORE and TEXTAFTER. Blank input should stay blank. Any malformed value should return 'Review'.

Beispielausgabe

The stable rule is text between one “<” and the following “>”. Because repeated delimiters are considered malformed, count them before extracting.

B2 formula =IF(TRIM(A2)="","",IF(AND(LEN(A2)-LEN(SUBSTITUTE(A2,"<",""))=1,LEN(A2)-LEN(SUBSTITUTE(A2,">",""))=1),TRIM(TEXTBEFORE(TEXTAFTER(A2,"<"),">")),"Review"))

The two length differences count opening and closing brackets. Only one of each allows extraction; TRIM removes surrounding spaces without changing accented or Chinese characters.

Legacy approach: use MID with FIND after the same bracket-count checks: TRIM(MID(A2,FIND("<",A2)+1,FIND(">",A2)-FIND("<",A2)-1)).

Tests: Ana Pérez and 王小明 return their full email addresses; blank returns blank; missing brackets and two opening brackets return Review. Also verify that “>” occurs after “<”; if reversed brackets exist in the data, add that condition before rollout.

Warum das funktioniert

  1. 1

    Observed patterns prevent a formula designed for one clean example from corrupting irregular rows.

  2. 2

    A visible malformed-input result makes later cleanup auditable.

Ergebnis prüfen

  • Does the extraction rule rely on a delimiter that is actually stable?

  • Are missing or duplicated delimiters reported rather than misparsed?

  • Does the formula preserve accents and non-Latin characters?

Sicher nutzen

Häufig gestellte Fragen

Praktische Antworten dazu, wann du dieses Rezept verwenden solltest, was du bereitstellen solltest und wo menschliche Prüfung weiterhin wichtig ist.

What should I prepare before using “Extract names, emails, or codes in Excel”?

For “Extract names, emails, or codes in Excel,” prepare Text to extract, Observed input patterns, and Excel version and rules. 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 “Extract names, emails, or codes in Excel” result not ready to use?

The result is not ready if it does not yet deliver the stated outcome—A robust extraction formula with malformed-input checks—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 “Extract names, emails, or codes in Excel”?

The published test record for “Extract names, emails, or codes 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.

Weitere Möglichkeiten zum Entdecken

Wo dieses Rezept hineinpasst

Bring die Arbeit voran