Trouble writing an excel formula.

H

hbb2699

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

I am having trouble writing a formula. This is basically what I want i
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 formul
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 t
add up the cells that I had put the above formula in. When I use th
sum formula for example =sum(D2:D13) it just puts a zero in that cel
instead of adding up the ones from the if formula. I figure it won'
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 firs
one but make it put the number in a seperate cell
 
R

Roger Govier

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

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
 
H

hbb2699

Dave said:
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
[/QUOTE]

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!!! :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top