Apologies if this is in the wrong section, seems the best area.
Im trying create a spreadsheet and want to include an IF statement or at least i think i do. What i want to do is compare say cell B1 to D1 and if D1 is a higher value then i want it to display the message" in the black" and if B1 is a lower value than D1 then the message to be displayed is "in the red". Ive tried what i think was the way of doing it but i keep on getting errors. The start of the stement is IF (B1<D1,"in the black"
have i got that correct or not, thanks.
Its for money puposes and want to see which months im spending more than a should.
thanks
Last edited by dcfc34; 07-26-2011 at 11:35 AM.
yes you are on the right track. IF statements are set up in the following manner:
IF(logical test, if true, if false)
When you want the function to yield a text string if the logical test is TRUE or FALSE, then the text needs to be placed in quotations (as you did).
So your final equation should be:
=IF(B1<D1,"in the black","in the red")
Thanks, i think its worked, i was just confused by the bit "in the red" as it didnt refer to anything so thought id missed something
Happy to help. With IF statements, the if true and if false statements always refer the logic that your testing (the first part of the IF function).
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks