{
  "name": "Handling a zero or blank baseline in a percent variance formula in Excel",
  "description": "Compares three ways of writing the (new - original) / original formula and what each returns when the baseline is zero or blank, compiled from Microsoft Support documentation on the #DIV/0! error and the IFERROR function.",
  "page": "https://casrai.org/guides/how-to-calculate-percent-variance-in-excel",
  "publisher": "CASRAI",
  "license": "https://creativecommons.org/licenses/by/4.0/",
  "dateModified": "2026-11-20T09:40:00Z",
  "temporalCoverage": "2026",
  "spatialCoverage": null,
  "columns": [
    {
      "name": "Approach",
      "unit": "",
      "description": ""
    },
    {
      "name": "Example formula",
      "unit": "",
      "description": ""
    },
    {
      "name": "Result when baseline is zero or blank",
      "unit": "",
      "description": ""
    },
    {
      "name": "Documented caveat",
      "unit": "",
      "description": ""
    }
  ],
  "rows": [
    {
      "Approach": "Plain formula",
      "Example formula": "=(C2-B2)/B2",
      "Result when baseline is zero or blank": "#DIV/0! error",
      "Documented caveat": "Error appears when a formula divides by zero or by a cell that is 0 or blank"
    },
    {
      "Approach": "IF test on the divisor",
      "Example formula": "=IF(B2,(C2-B2)/B2,\"\")",
      "Result when baseline is zero or blank": "Returns the substitute value (blank in this example)",
      "Documented caveat": "Microsoft's pattern is IF(A3,A2/A3,0); the substitute can be 0, an empty string or a message"
    },
    {
      "Approach": "IFERROR",
      "Example formula": "=IFERROR((C2-B2)/B2,\"\")",
      "Result when baseline is zero or blank": "Returns the value_if_error argument",
      "Documented caveat": "Suppresses all errors, not just #DIV/0!"
    }
  ],
  "sources": [
    {
      "title": "Microsoft Support: How to correct a #DIV/0! error",
      "url": "https://support.microsoft.com/en-us/excel/how-to-correct-a-div-0-error",
      "accessed": "2026-11-14"
    },
    {
      "title": "Microsoft Support: IFERROR function",
      "url": "https://support.microsoft.com/en-us/office/iferror-function-c526fd07-caeb-47b8-8bb6-63f3e417f611",
      "accessed": "2026-11-14"
    }
  ]
}