Hi,
I am using an IF function to test if a condition is true or false in Excel 2007.
=IF ( logical_test, value_if_true, value_if_false )
The value that I want to put if condition is true is '1' and if false is '0'. I would like to do a total of all the 1s in the column, however this value is saved as text instead of a number and I unable to do the sum.
Is there a way to change the value from number to text.
I appreciate any help.
Stan
Hi Stan,
In your IF function, be sure to not put the 1 or 0 in quotes. For example:
=IF(B10="cat",1,0)
Not
=IF(B10="cat","1","0")
Also, if that's not possible to reconcile, you can select your range of 1's and 0's that are formatted as text, then on the Data tab click Text-to-Columns and immediately click Finish. (Make sure those cells are formatted as General or Number, not Text - on the Home tab).
Hope that helps.
Hey Paul, that worked just perfect. Thank you so much. Sure enough I had my 1s and 0s in quotes. Appreciate it!!
Stan
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks