+ Reply to Thread
Results 1 to 4 of 4

Trouble writing an excel formula.

  1. #1
    Registered User
    Join Date
    06-08-2006
    Posts
    3

    Trouble writing an excel formula.

    I am somewhat new to excel and writing formulas. So bear with me on my question. I am not sure how to really write everything so hopefully you can get what I am asking from it. Thanks!!!

    I am having trouble writing a formula. This is basically what I want it to say.
    If cell D2 is greater than or equal to 1, than the put a 1 in the cell, if not put a zero in the cell. Now I am pretty sure I got this formula correct. What I typed was =IF(D2>=1,"1","0")
    The second part of what I want to do isn't working though. I want to add up the cells that I had put the above formula in. When I use the sum formula for example =sum(D2:D13) it just puts a zero in that cell instead of adding up the ones from the if formula. I figure it won't add them because the cells have formulas in them and not only a number. I was wondering if it is possible to write a formula similar to my first one but make it put the number in a seperate cell?

  2. #2
    Roger Govier
    Guest

    Re: Trouble writing an excel formula.

    Hi
    Almost there.
    Just get rid of the quotes around the 1 and 0, that is making them text
    and affecting your summation
    =IF(D2>=1,1,0)
    then your summation will work.

    --
    Regards

    Roger Govier


    "hbb2699" <[email protected]> wrote
    in message news:[email protected]...
    >
    > I am somewhat new to excel and writing formulas. So bear with me on my
    > question. I am not sure how to really write everything so hopefully
    > you
    > can get what I am asking from it. Thanks!!!
    >
    > I am having trouble writing a formula. This is basically what I want
    > it
    > to say.
    > If cell D2 is greater than or equal to 1, than the put a 1 in the
    > cell,
    > if not put a zero in the cell. Now I am pretty sure I got this formula
    > correct. What I typed was =IF(D2>=1,"1","0")
    > The second part of what I want to do isn't working though. I want to
    > add up the cells that I had put the above formula in. When I use the
    > sum formula for example =sum(D2:D13) it just puts a zero in that cell
    > instead of adding up the ones from the if formula. I figure it won't
    > add them because the cells have formulas in them and not only a
    > number.
    > I was wondering if it is possible to write a formula similar to my
    > first
    > one but make it put the number in a seperate cell?
    >
    >
    > --
    > hbb2699
    > ------------------------------------------------------------------------
    > hbb2699's Profile:
    > http://www.excelforum.com/member.php...o&userid=35224
    > View this thread:
    > http://www.excelforum.com/showthread...hreadid=549994
    >




  3. #3
    Dave
    Guest

    Re: Trouble writing an excel formula.

    hbb2699

    If I am not misunderstanding you, I believe that you have created a circular
    reference. If you data is in D2 to D13, I would suggest using the formula
    you stated in cells E2 to E13 and then sum that column.

    Hope this helps

    Dave


    "hbb2699" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I am somewhat new to excel and writing formulas. So bear with me on my
    > question. I am not sure how to really write everything so hopefully you
    > can get what I am asking from it. Thanks!!!
    >
    > I am having trouble writing a formula. This is basically what I want it
    > to say.
    > If cell D2 is greater than or equal to 1, than the put a 1 in the cell,
    > if not put a zero in the cell. Now I am pretty sure I got this formula
    > correct. What I typed was =IF(D2>=1,"1","0")
    > The second part of what I want to do isn't working though. I want to
    > add up the cells that I had put the above formula in. When I use the
    > sum formula for example =sum(D2:D13) it just puts a zero in that cell
    > instead of adding up the ones from the if formula. I figure it won't
    > add them because the cells have formulas in them and not only a number.
    > I was wondering if it is possible to write a formula similar to my first
    > one but make it put the number in a seperate cell?
    >
    >
    > --
    > hbb2699
    > ------------------------------------------------------------------------
    > hbb2699's Profile:
    > http://www.excelforum.com/member.php...o&userid=35224
    > View this thread: http://www.excelforum.com/showthread...hreadid=549994
    >




  4. #4
    Registered User
    Join Date
    06-08-2006
    Posts
    3

    Smile

    Quote Originally Posted by Dave
    hbb2699

    If I am not misunderstanding you, I believe that you have created a circular
    reference. If you data is in D2 to D13, I would suggest using the formula
    you stated in cells E2 to E13 and then sum that column.

    Hope this helps

    Dave


    >[/color]
    I am sorry, I think I messed up on the cell letters.

    The cells I am putting the IF formula in are F2 through F13. The data is in cells D2 through D13.

    It did work however, to take out the " around the numbers. I didn't realize that using a " made it text. Thank you both very much for your help!!!

+ 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.6.0 RC 1