+ Reply to Thread
Results 1 to 4 of 4

Thread: Confused with sum of an if stmt

  1. #1
    Registered User
    Join Date
    11-28-2011
    Location
    NJ
    MS-Off Ver
    Excel 2003
    Posts
    2

    Confused with sum of an if stmt

    I am trying to get a sum of an if statement. I am using the basic sum() function and it does not give me any value. I am not sure why. I used the if stmt below to get values and what to get the total. please advise on what i am doing wrong.

    =IF(A2=1,"$10.00",IF(A2=0,"$ 0.00"))

  2. #2
    Valued Forum Contributor Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens Greece
    MS-Off Ver
    Excel 2003
    Posts
    2,297

    Re: Confused with sum of an if stmt

    Hi

    Your formula works fine for me..

    Take a look to the attachement

    Regards
    Attached Files Attached Files
    Regards

    Fotis.

    I am proud that i am Greek.

    Just to know every one.We Greeks, we are nοt proud of our politicians. Υou?

    Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.


    My Avadar picture, is from Athens Acropolis.
    http://www.theacropolismuseum.gr

    http://www.visitgreece.gr/

  3. #3
    Cheeky Forum Moderator Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2003, 2007, 2010
    Posts
    3,711

    Re: Confused with sum of an if stmt

    By enclosing the "values" in quotes, you make them text...not numbers.

    Try this:
    =IF(A2=1,10,IF(A2=0,0))

    However, your formula is incomplete.
    It does not cover other possibilities for A2.
    If A2 can only be 0 or 1, then perhaps this will work better;
    =A2*10

    Does any of that help?
    Regards,

    Ron
    Microsoft MVP - Excel
    (Oct 2006 - Sep 2012)

    Click here to see the Forum Rules

  4. #4
    Registered User
    Join Date
    11-28-2011
    Location
    NJ
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Confused with sum of an if stmt

    Great!!!! I removed the quotation marks and it worked!!!!!!!!!!!

    Thanks!

+ 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