Hi all<br><br>A very able programming student (he won Swingame and writes Java code on the whiteboard for amusement!) sent me this:<br>***************************************<br>Hi Mr Sutton,<br><br>I have come with a dispute. Question 9 in the multiple choice.<br>
<br>"<br>
Typing the formula =IF(D12<D6,"HOORAY"," ") in D13 returns<br>
A. HOORAY<br>
B. NO MONEY LEFT OVER<br>
C. ""<br>
D. "HOORAY"<br>
<p>Answer is A.</p>
<p>Using the data provided, D12 (total March income) is 1400+150+800 = $2350. D6 is 2500+30+20 = $2550. </p>
<p>Plugging those figures into the formula gives
=IF(2350<2550,"HOORAY"," ").<br>
Since 2350 is less than 2550, the 'true' condition of the IF is calculated: the literal text <em>Hooray.</em><br>
There are no double quotes displayed in the cell, so it's not D."<br><br>The
question asks what is returned by the statement, not what is displayed.
I wrote this on the examination paper indicating the difference and the
wording, so this answer in my opinion is wrong. The value it returns is
a string, hence the quotes, but a string is displayed in a cell omits
the quotation marks, but the question does not state "what is
displayed" but rather "what is returned".<br><br>Hopefully you can return some light to this.<br><br>Cheers,</p><p>Josh<br></p>*******************************************<br>My reply:<br>Hi Josh<br><br>My response is also A.<br>
<br>The STRING HOORAY is returned.<br><br>You TELL Excel the value for the true is the string HOORAY by typing (and displaying in the formula) "HOORAY".<br><br>However, I can see your interpretation, but I think the RETURN is HOORAY - a string. Our CONVENTION is to use the "....".<br>
<br>However, writing on the paper is probably a COMPLETE waste of time.<br><br>Anyone with thier ideas?<br><br clear="all">Regards<br><br>COLIN<br>