title: What is the data type returned for an IF function (SharePoint Calculated Column)?
body: <p>I have a rather long calculated column which uses the drop-downs of two other columns to return a 'score' based on their values.</p>
  <p>A section of it looks like this:</p>
  <pre><code>IF(AND([Current Impact]=&quot;High&quot;,[Current Probability]=&quot;Low&quot;),17)
  </code></pre>
  <p>This would return the value 17 if the impact is high and the probability is low in those other columns.</p>
  <p>This seems to return the 17 as a string rather than a number because sorting on my calculated column (score) from high to low produces a result sorted on the first digit e.g. 5, 4, 32, 2, 18</p>
  <p>I have a workaround to this - I enclose the whole formula in a (an?) <code>=value()</code> function.</p>
  <p>However, I'm curious as to why the IF function returns the string data types instead of a number?</p>