Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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.

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.

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. :DThe 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.

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")+0So 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.

![]() |
pop up calendar and date ...
|
what program is used to w...
|

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