Posted 8 September 2017, 3:18 pm ESTI have a cell that the initial spreadsheet has the VLookup function. If this function returns a "NONE" I want to set the sell to some value in code.
sDescription = fpSpreadCosts.Sheets.Cells[rowdetail + rp, col + 2].Text;
if (((rp > 5 && sDescription.ToUpper() != "NONE") || sDescription == "NO PART FOUND" && sCostOver.Length < 1))
fpSpreadCosts.Sheets.Cells[rowdetail,c].Text = sMaterialDesc;
The above statement gets ignored and the formula is still in the cell. What is the command needed to remove the formula 1st so the ".Text" works.