Fix set cell value to handle both formulas and numbers