private void FormatNumber(Excel.Range cell, double Number, bool IsMissing = false, bool ShowSolution = false) { // Write number if (!IsMissing || ShowSolution) cell.Value = Number; // Format Cell if (IsMissing) { cell.BorderAround2(Excel.XlLineStyle.xlContinuous, Excel.XlBorderWeight.xlThin); if (ShowSolution) { cell.Font.Bold = true; cell.Interior.Color = 65535; } } }