+ Reply to Thread
Results 1 to 5 of 5

Thread: Excel IF statements

  1. #1
    Registered User
    Join Date
    07-26-2011
    Location
    uk
    MS-Off Ver
    Excel 2003
    Posts
    3

    Question Excel IF statements

    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.

  2. #2
    Registered User
    Join Date
    07-08-2011
    Location
    Norfolk, VA
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Excel IF statements

    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")

  3. #3
    Registered User
    Join Date
    07-26-2011
    Location
    uk
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Excel IF statements

    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

  4. #4
    Registered User
    Join Date
    07-08-2011
    Location
    Norfolk, VA
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Excel IF statements

    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).

  5. #5
    Registered User
    Join Date
    07-26-2011
    Location
    uk
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Excel IF statements

    Quote Originally Posted by Rahbee View Post
    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).
    thanks again,

    think ill do a bit of reading up on them then,

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0