Diagnose and fix an Excel formula error

Auteur: AILesson5 min de préparationTesté avec:ChatGPTRévisé: 2026-08-28

Réponse rapide

Find the root cause of an Excel error before replacing the formula. Fournir: Error and formula, Referenced data, Intended behavior. Résultat attendu: A diagnosis, minimal correction, and verification plan.

1

Ajouter votre contexte

Votre texte reste dans ce navigateur. AILesson Prompts ne l’envoie ni à un modèle ni à un serveur.

2

Votre prompt

Les champs non remplis restent visibles sous forme d’espaces réservés, afin que vous puissiez quand même copier et modifier le prompt.

Diagnose this Excel formula problem:
[error]

Referenced data and representative values:
[context]

Intended behavior:
[intent]

Do not immediately wrap the formula in IFERROR. First list the most likely causes in evidence order and give a quick test for each. Then provide the smallest justified correction, explain exactly what changed, and show tests for a normal row, the reported failure, a blank, and a no-match case. Keep genuine data-quality problems visible instead of hiding them with a fallback value.
Essayer dans le Playground
Privé par défautL’assemblage du prompt se fait localement dans votre navigateur. Évitez de placer des informations confidentielles dans un service d’IA, sauf si votre organisation l’autorise.

De l'entrée au résultat

Un exemple détaillé

Voyez comment un contexte concret transforme cette recette en résultat utilisable.

Entrée réelle

Error and formula
E2 shows #N/A. Formula: =XLOOKUP(A2,Inventory!A:A,Inventory!C:C)
Referenced data
A2 visually contains SKU-1042. Inventory column A contains imported SKU codes; the matching row appears as 'SKU-1042 ' with a trailing space. Inventory column C contains stock quantity numbers.
Intended behavior
Return the stock quantity for a matching SKU. Keep truly unknown SKUs visible as 'Not found'. Blank input rows should stay blank.

Exemple de sortie

Most likely cause: The lookup value and imported key are not exactly equal because the inventory key has a trailing space. Confirm with =LEN(A2) and =LEN(Inventory!A2), or compare =A2=Inventory!A2. A second possibility is another non-printing character; test with CLEAN after TRIM.

Smallest justified correction: Clean the source key in a helper column, for example Inventory D2: =TRIM(CLEAN(A2)), fill it down, then use: =IF(A2="","",XLOOKUP(TRIM(CLEAN(A2)),Inventory!D:D,Inventory!C:C,"Not found"))

This preserves a visible no-match result, keeps blank request rows blank, and avoids recalculating transformations across a full imported column inside every lookup.

Tests: SKU-1042 with a cleaned source key returns its stated quantity; the original trailing-space row now matches; blank A2 returns blank; SKU-9999 returns “Not found.” Inspect duplicate cleaned keys before filling down because cleaning can collapse two different raw values into the same key.

Pourquoi cela fonctionne

  1. 1

    Cause-first diagnosis avoids hiding broken references or dirty data behind IFERROR.

  2. 2

    A minimal correction is easier to review than an unrelated replacement formula.

Vérifier le résultat

  • Was the reported cause reproduced with the supplied values?

  • Does the correction preserve visible signals for unexpected data?

Utilisez-la en toute confiance

Questions fréquentes

Des réponses pratiques sur le bon moment pour utiliser cette recette, ce qu’il faut fournir et les cas où une vérification humaine reste nécessaire.

What should I prepare before using “Diagnose and fix an Excel formula error”?

For “Diagnose and fix an Excel formula error,” prepare Error and formula, Referenced data, and Intended behavior. 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 “Diagnose and fix an Excel formula error” result not ready to use?

The result is not ready if it does not yet deliver the stated outcome—A diagnosis, minimal correction, and verification plan—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 “Diagnose and fix an Excel formula error”?

The published test record for “Diagnose and fix an Excel formula error” 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.

Plus de façons d'explorer

Où se situe cette recette

Faites avancer votre travail