Computing.Net > Forums > Office Software > How to make logical statements output numbers

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

How to make logical statements output numbers

Reply to Message Icon

Name: xeltius
Date: July 6, 2009 at 13:31:57 Pacific
OS: Windows XP
Subcategory: Microsoft Office
Comment:

I am trying to find a way to cause a logical
statement to cause another cell to output a
number such as "4" if true and "0" if false. That
is not where my problem lies,however. My
problem comes when I try to sum a column of
numbers generated from an if/then statement.
Excel seems to treat the numbers as
symbols/words and not numbers. Thus, a
summation of the cells outputs a zero
because technically, no numbers are there.
Any ideas. I would greatly appreciate it.



Sponsored Link
Ads by Google

Response Number 1
Name: xeltius
Date: July 6, 2009 at 13:36:11 Pacific
Reply:

PS: I have tried this on excel 2003 and 2007. I assume that if
this issue can be overcome, it should transcend the version of
excel as I am sure it is something really simple like a specific
equation or something.


0

Response Number 2
Name: xeltius
Date: July 6, 2009 at 14:13:24 Pacific
Reply:

The answer:

My if/then statement was set up as follows;

=IF(D6="Yes","4","0")

This caused excel to treat the 4 and 0 as words and not
numbers. Therefore, I could not sum them up. By removing the
parenthesis, excel would treat them as numbers and I could
add them. :D

The statement should read:

=IF(D6="Yes",4,0)

Alternatively, it should be noted that the 4 and 0 can also be
replaced with a cell such as C7.


0

Response Number 3
Name: DerbyDad03
Date: July 6, 2009 at 18:23:05 Pacific
Reply:

Just as an FYI...

Excel really likes numbers, so if you are stuck with a "text number" Excel will usually allow you to perform an arithmetic operation on it and turn it into a number.

For example, both of these would have solved your problem also:

=IF(D6="Yes","4","0")*1
=IF(D6="Yes","4","0")+0

So would have a Copy/Paste Special...Add of 0 or a blank cell, Copy/Paste Special...Multiply of 1, etc.

Maybe these tips will help you in the future.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


pop up calendar and date ... what program is used to w...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: How to make logical statements output numbers

how to make adding form in excel. www.computing.net/answers/office/how-to-make-adding-form-in-excel/334.html

how to make a text file www.computing.net/answers/office/how-to-make-a-text-file/8172.html

How to make search by ID number www.computing.net/answers/office/how-to-make-search-by-id-number-/3341.html